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: [ IconButton(icon: Icon(Icons.close), onPressed: onClose), ], ), body: body, ), ), ); } }