commons 0.4.3 copy "commons: ^0.4.3" to clipboard
commons: ^0.4.3 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
  • Stack trace screen
  • Shared Preferences functions
  • Value validators
  • Date and Time functions
  • Connection Functions
  • http rest client api functions

How to use #

1. Depend on it #

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

dependencies:  
  commons: ^0.4.3

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 #

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

Documentation #

For help getting started with Commons, view our online Documentation. Get complete code from Github. Author: Ch Arbaz Mateen

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

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

More

Packages that depend on commons