flutter_dialogs 0.0.1+1 copy "flutter_dialogs: ^0.0.1+1" to clipboard
flutter_dialogs: ^0.0.1+1 copied to clipboard

outdated

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 #

Name Description Options
FDPlatform Forces the dialog to adapt to a specified platform design language, and disregard current host OS. ANDROID_ONLY,
IOS_ONLY,
ALL

Basic Components #

Name Parameters
FDBasicDialog String title,
String content,
String buttonTitle,
Function onPressed
More coming out soon!

Extendable Components #

Name Parameters
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.