mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-23 05:19:22 +00:00
43 lines
922 B
Dart
43 lines
922 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
/// Conversation window
|
|
///
|
|
/// Simple container for a conversation
|
|
///
|
|
/// @author Pierre Hubert
|
|
|
|
class ConversationWindowContainer extends StatelessWidget {
|
|
final Widget title;
|
|
final void Function() onClose;
|
|
final Widget body;
|
|
|
|
const ConversationWindowContainer({
|
|
Key key,
|
|
@required this.title,
|
|
@required this.onClose,
|
|
@required this.body,
|
|
}) : assert(title != null),
|
|
assert(onClose != null),
|
|
assert(body != null),
|
|
super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
child: Container(
|
|
width: 300,
|
|
height: 400,
|
|
child: Scaffold(
|
|
appBar: AppBar(
|
|
title: title,
|
|
actions: <Widget>[
|
|
IconButton(icon: Icon(Icons.close), onPressed: onClose),
|
|
],
|
|
),
|
|
body: body,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|