showOkDialog function

Future showOkDialog(
  1. BuildContext context, {
  2. String title = '',
  3. String content = '',
})

Implementation

Future showOkDialog(BuildContext context, { String title = '', String content = '' }) {
  return showDialog(context: context, builder: (context) => AlertDialog(
    title: Text(title),
    content: Text(content),
    actions: [TextButton(onPressed: () {
      Navigator.of(context).pop();

    }, child: Text('Ok'))],
  ));
}