import 'package:flutter/material.dart'; class ShowAlertDialog extends StatelessWidget { @override Widget build(BuildContext context) { return AlertDialog( actions: [ FlatButton( child: Text('Cancel'), onPressed: () { Navigator.of(context).pop(); }, ), FlatButton( child: Text('Show'), onPressed: () { Navigator.of(context).pop(); }, ) ], content: TextField( maxLines: 5, autofocus: true, decoration: InputDecoration( border: OutlineInputBorder(), ), ), ); } }