shirne_dialog 2.0.3 shirne_dialog: ^2.0.3 copied to clipboard
A package to use alert, confirm, toast, imagePreview, snack and popup within one line code.
dialog #
A package for flutter to use alert and toast within one line code.
function #
- toast
- alert
- confirm
- modal
- popup
- imagePreview
- snack
- loading
usage #
MyDialog.of(context).toast('tip message');
MyDialog.of(context).alert(Text('alert message'));
MyDialog.of(context).confirm(Text('alert message')).then((v){
});
MyDialog.of(context).popup(Text('popup contents'));
MyDialog.of(context).snack('tip');
Or
// initialize in mainApp's first page
MyDialog.initialize(context,MyDialogSetting());
// Or use Mydialog.navigatorKey with MaterialApp
MaterialApp(
//...
navigatorKey: MyDialog.navigatorKey,
//...
);
// call in anywhere
MyDialog.confirm('aaa');
MyDialog.alert('test');
MyDialog.toase('test');