flutter_dialogs 0.0.1+1

Flutter Android iOS

Platform aware dialog and alert widgets.

flutter_dialogs #

Platform aware dialog and alert widgets.

NOTE: This is still in technical preview

Features #

  • Platform aware dialog and alert widgets
  • Ready to use dialogs with common UX/UI patterns
  • Extendable components for custom platform-aware dialog and alert widgets

Configuration #

NameDescriptionOptions
FDPlatformForces the dialog to adapt to a specified platform design language, and disregard current host OS.ANDROID_ONLY,
IOS_ONLY,
ALL

Basic Components #

NameParameters
FDBasicDialogString title,
String content,
String buttonTitle,
Function onPressed
More coming out soon!

Extendable Components #

NameParameters
More coming out soon!

Basic Usage #

  1. Declare an FDConfig.
FDConfig _config = FDConfig(FDPlatform.ALL);
  1. Present the dialog via showDialog.
Future<void> _showDialog(BuildContext context) {
    return showDialog<void>(
        context: context,
        builder: (BuildContext context) {
        return FDBasicDialog(
            config: _config,
            title: "Title",
            content: "Description",
            buttonTitle: "OK",
            onPressed: (dialog) {
                // Print host OS
                print(FDUtils.getHostPlatformOS());

                // Dismiss dialog
                dialog.dismiss(context);
            },
        );
        },
    );
}

Contributing #

  1. Fork the repo.
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License #

flutter_dialogs is released under the GNU General Public License v3.0. See LICENSE for details.

9
likes
70
pub points
87%
popularity

Publisher

joshuadeguzman.net

Platform aware dialog and alert widgets.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_dialogs