showAlert method

Future<void> showAlert(
  1. BuildContext _context,
  2. String _title,
  3. List<Widget> _body,
  4. List<Widget> _actions,
)

Implementation

Future<void> showAlert(BuildContext _context, String _title,
    List<Widget> _body, List<Widget> _actions) async {
  return showDialog<void>(
    context: _context,
    barrierDismissible: false,
    builder: (BuildContext context) {
      return AlertDialog(
        title: Text(_title),
        content: SingleChildScrollView(
          child: ListBody(
            children: _body,
          ),
        ),
        actions: _actions,
      );
    },
  );
}