showSuccessDialogue method Null safety
- BuildContext context,
- String title,
- String message
Shows a success dialogue containing a positive title and message.
The only action is to close the dialogue by pressing 'OK'.
Implementation
static Future<void> showSuccessDialogue(
    BuildContext context, String title, String message) async {
  await showDialog(
    context: context,
    builder: (BuildContext context) => AlertDialog(
      title: Text(title),
      content: Text(message),
      actions: <Widget>[
        TextButton(
          onPressed: () => Navigator.pop(context),
          child: const Text('OK'),
          style: ButtonStyle(
            foregroundColor: MaterialStateProperty.all(Colors.green),
          ),
        ),
      ],
    ),
  );
}