waiter 1.0.5 copy "waiter: ^1.0.5" to clipboard
waiter: ^1.0.5 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.

3
likes
140
pub points
0%
popularity
screenshot

Publisher

verified publishermbfakouri.ir

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