pretty_dialog 1.0.1 copy "pretty_dialog: ^1.0.1" to clipboard
pretty_dialog: ^1.0.1 copied to clipboard

A Flutter package of dialogs and toasts

Pretty Dialog #

A package to use for dialogs and toasts in Flutter Apps

Usage #

Alert Dialog #

PrettyDialog.showAlertDialog(
    context,
    alertType: AlertType.success,
    okText: "OK",
    title: "Your account is created successfully",
);

Action Dialog #

var result = await PrettyDialog.showActionDialog(context,
    icon: CupertinoIcons.person_crop_circle_badge_xmark,
    iconColor: Colors.deepOrangeAccent,
    yesText: "Yes, Delete",
    yesColor: Colors.deepOrangeAccent,
    cancelText: "No",
    // you can set noText, but cancel text will create outlined button
    title: "Are you sure to delete your Account?",
    subTitle: "All your data will be permanently deleted, This can't be undone"
);
// result will be `true` for Yes button, `false` for No and `null` for Cancel

Options Dialog #

var result = await PrettyDialog.showOptionsDialog(context,
    icon: FontAwesomeIcons.dumbbell,
    title: "لماذا تمارس التمارين الرياضية؟",
    options: [
"لبناء العضلات",      
"لإنقاص الوزن",      
      "للحفاظ على الصحة بشكل عام",
    ]);
// result is an integer, the index of the selected option

Toast #

PrettyToast.showErrorToast(context, "Something Went Wrong!");

Progress Toast #

PrettyToast.showProgressToast(context, text: "جاري العمل ...");
Future.delayed(const Duration(seconds: 3), () => PrettyToast.hideProgressToast());
2
likes
120
points
18
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package of dialogs and toasts

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on pretty_dialog