commons 0.3.7 copy "commons: ^0.3.7" to clipboard
commons: ^0.3.7 copied to clipboard

outdated

Commons Flutter package includes alert dialogs, extension functions and much more... Written by 'Ch Arbaz Mateen'

Commons #

Commons Flutter package can used for Flutter Android and IOS applications.

Includes

  • Alert dialog
  • Toast messages
  • Loading screen
  • Extensions functions
  • Strack trace dialog
  • Shared Preferences functions
  • Value validators
  • Date and Time functions

How to use #

1. Depend on it #

Add this to your package's pubspec.yaml file:


    dependencies:  
      commons: ^0.3.7
   

2. Install it #

You can install packages from the command line:

with Flutter:


    $ flutter pub get
    

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it #

Now in your Dart code, you can use:


    import  'package:commons/commons.dart';

Dialogs #

  • Success Dialog
  • Error Dialog
  • Warning Dialog
  • Info Dialog
  • Confirmation Dialog
  • Wait Dialog

How to use #

Success Dialog #


    successDialog(  
        context,  
        "Success message",  
        negativeText: "Try Again",  
        negativeAction: () {},  
        positiveText: "Details",  
        positiveAction: () {},  
    );

Confirm Dialog #


    confirmationDialog(
        context, 
        "Confirm demo dialog", 
        positiveText: "Delete", 
        positiveAction: () {}
    );

Toasts #

  • Success Toast
  • Error Toast
  • Warning Toast
  • Info Toast

How to use #

Commons used OKToast dart package please check OKToast requirements first.


    successToast("Success toast");

Loading screen #

    
    loadingScreen(  
        context,  
        duration: Duration(  
            seconds: 5,  
        ),  
        loadingType: LoadingType.JUMPING,
    ),
    

Documentation #

54
likes
0
pub points
71%
popularity

Publisher

unverified uploader

Commons Flutter package includes alert dialogs, extension functions and much more... Written by 'Ch Arbaz Mateen'

Homepage
Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

date_format, device_info, flutter, intl, oktoast, package_info, progress_indicators, share, shared_preferences, time, url_launcher

More

Packages that depend on commons