waiter 1.0.7 copy "waiter: ^1.0.7" to clipboard
waiter: ^1.0.7 copied to clipboard

A Flutter package to display loading indicators, error messages, and progress bars.

logo

Waiter #

pub package
A Flutter package to display loading indicators, error messages, and progress bars.

Features #

  • Show loading
  • Show error
  • Show progress
  • Manage retries
  • Support sheets
  • Support dialogs
  • Support Material 1,2,3

Example App #

Usage #

Quick simple usage example:

WaiterController waiterController = WaiterController();

...

Waiter(
    callback: waiterController,
    onTry: (value) {
      print("onTry");
      
      if(value == "errorTag"){
        print("errorTag");    
      }
    },
    firstLoadShowLoading: false,
    child: Scaffold(
      ...
    ),
);

...
    
waiterController.showLoading();
waiterController.showError("errorTag");

Progress #

If you need progress, you can use the following code

WaiterController waiterController = WaiterController();

ValueNotifier<double> progress = ValueNotifier<double>(0);
ValueNotifier<int> currentNumberProgress = ValueNotifier<int>(0);
ValueNotifier<int> totalNumberProgress = ValueNotifier<int>(0);

...

Waiter(
  callback: waiterController,
  onTry: (value) {
    print("onTry");
  },
  firstLoadShowLoading: true,
  progress: progress,
  currentNumberProgress: currentNumberProgress,
  totalNumberProgress: totalNumberProgress,
  onCancelProgress: (value) {
    print("onCancelProgress");
  },
  onDismissProgress: () {
    print("onDismissProgress");
  },
  child: Scaffold(
    ...
  ),
);

...

waiterController.showProgress("progressTag");

totalNumberProgress.value = 1;
currentNumberProgress.value = 1;
progress.value = 50.0;

Multi Language #

There is a possibility of customization for different languages in this package

WaiterLanguage language = WaiterLanguage.copy(
    confirm: S.current.confirm,
    pleaseWait: S.current.pleaseWait,
    cancel: S.current.cancel,
    tryAgain: S.current.tryAgain);
    
Waiter(
  ...
  language: language,
  ...
);   

S For intl Package

Getting Started #

For help getting started with Flutter, view our online documentation.

For help on editing plugin code, view the documentation.

5
likes
160
points
304
downloads
screenshot

Publisher

verified publishermbfakouri.ir

Weekly Downloads

A Flutter package to display loading indicators, error messages, and progress bars.

Repository (GitHub)
View/report issues

Topics

#waiter #loading #error #progress #retries

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_screenutil, fluttertoast, lottie

More

Packages that depend on waiter