Created
January 4, 2022 15:10
-
-
Save edemekong/4130fb852aed9135f3766a174f5cddc0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'alert_dialog.dart'; | |
Future<bool?> showAlertDialogs(BuildContext context, {required String title, required String content}) async { | |
bool? response; | |
await showDialog( | |
context: context, | |
builder: (context) => MyAlertDialog( | |
title: title, | |
content: content, | |
buttonText1: 'Yes', | |
buttonText2: 'No', | |
callback: (bool v) { | |
response = v; | |
}, | |
), | |
); | |
return response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment