import 'package:flutter/material.dart'; import 'AppPermissionHandler.dart'; Future showConfirmDialogs( context, msg, positiveText, negativeText) async { return showDialog( context: context, barrierDismissible: false, builder: (context) { return AlertDialog( backgroundColor: Colors.white, title: Text(msg, style: TextStyle(fontSize: 16)), actions: [ TextButton( child: Text( negativeText, ), onPressed: () { Navigator.of(context).pop(ConfirmAction.CANCEL); }, ), TextButton( child: Text( positiveText, ), onPressed: () { Navigator.of(context).pop(ConfirmAction.ACCEPT); }, ) ], ); }, ); }