Last updated:
0 purchases
flutter dialog helper
Show very simple dialogs in Flutter with a single line.
Keep in mind that these are very minimalistic dialogs with very few options to
customize.
Installation #
Add to pubspec.yaml #
dependencies:
flutter_dialog_helper: ^0.1.0
copied to clipboard
Usage #
Usually you will want to call any of the methods inside the callback of a button:
Success Message #
ElevatedButton(
onPressed: (){
showSuccessMessage(context, 'Success!!!');
},
child: const Text('Success Message'),
),
copied to clipboard
Error Message #
ElevatedButton(
onPressed: (){
showErrorMessage(context, 'Error!!!');
},
child: const Text('Error Message'),
),
copied to clipboard
Confirmation Dialog #
ElevatedButton(
onPressed: () async{
bool? confirm = await showConfirmationMessage(context, 'Confirmation', 'Are you sure?');
setState(() {
lastConfirmation = confirm;
});
},
child: const Text('Confirmation Dialog'),
),
copied to clipboard
Prompt Dialog #
ElevatedButton(
onPressed: () async{
String? input = await showPromtDialog(context, 'Input dialog',);
setState(() {
lastInput = input;
});
},
child: const Text('Prompt Dialog'),
),
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.