GithubHelp home page GithubHelp logo

dialogs's Introduction

Dialogs - dialogs

This flutter package provides aesthetically designed dialog box with customization options.

Now comes with legacy_progress_dialog

Choice Dialog

Choice Dialog Choice Dialog Rectangular Choice Dialog Rectangular Buttons

Message Dialog

Message Dialog Gif Message Dialog Message Dialog

Pub Version GitHub Workflow Status Github Stars GitHub

Simple Usage

To use this plugin, add dialogs as a dependency in your pubspec.yaml file.

Implementation:

  • import 'package:dialogs/dialogs.dart';

ChoiceDialog

  • use ChoiceDialog().show() function to display the dialog.

ChoiceDialog().show(context);

##OR


final choiceDialog = ChoiceDialog();
choiceDialog.show(context);

MessageDialog

  • use MessageDialog().show() function and call the Choice Dialog .

MessageDialog().show(context);

OR


final messageDialog = MessageDialog();
choiceDialog.show(context);

Show progress dialog :

//Create an instance of ProgressDialog
ProgressDialog progressDialog = ProgressDialog(
                  context: context,
                  backgroundColor: Colors.blue,
                  textColor: Colors.White,
                );
// show dialog
progressDialog.show();

//close dialog
progressDialog.dismiss();

You are good to go ๐Ÿ’ฏ



In order to add the ChoiceDialog, MessageDialog to your app, there are several attributes that are important parameters that you might need frequently:

Attribute Type Default Required Description
buttonOkOnPressed Function() Navigator.pop(context) No This function will be registered as the callback of 'Ok' button.
buttonCancelOnPressed Function() Navigator.pop(context) No This function will be registered as the callback of 'Cancel' button.
dialogRadius double 15.0 No Determines the borderRadius of dialog box.
buttonRadius double 18.0 No Determines the borderRadius of action buttons.
iconButtonOk Icon null No Renders a FlatButton with the provided icon for positive action.
iconButtonCancel Icon null No Renders a FlatButton with the provided icon for negative action.


show() also provides some useful parameters of showDialog() function

Attribute Type Default Required Description
context BuildContext Null Yes The context argument is used to look up the Navigator and Theme for the dialog.
barrierDismissible bool true No Indicates whether tapping on the barrier will dismiss the dialog.
barrierColor Color Colors.black54 No Specifies the color of the modal barrier that darkens everything below the dialog.

CREDITS

Contributors

Made with contributors-img.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.