ScreenLoadingIndicator constructor

const ScreenLoadingIndicator({
  1. Key? key,
  2. Stream<bool>? indicatorStream,
  3. ValueNotifier? indicatorNotifier,
  4. bool valueMapper()?,
  5. bool preventPop = true,
  6. ScreenLoadingIndicatorType type = ScreenLoadingIndicatorType.stack,
  7. required Widget child,
  8. Duration duration = const Duration(milliseconds: 500),
  9. AnimatedSwitcherTransitionBuilder transitionBuilder = AnimatedSwitcher.defaultTransitionBuilder,
  10. AnimatedSwitcherLayoutBuilder layoutBuilder = AnimatedSwitcher.defaultLayoutBuilder,
  11. DefaultLoadingStyle style = const DefaultLoadingStyle(),
  12. Widget builder(
    1. BuildContext context
    )?,
})

Implementation

const ScreenLoadingIndicator({
  Key? key,
  this.indicatorStream,
  this.indicatorNotifier,
  this.valueMapper,
  this.preventPop = true,
  this.type = ScreenLoadingIndicatorType.stack,
  required this.child,
  this.duration = const Duration(milliseconds: 500),
  this.transitionBuilder = AnimatedSwitcher.defaultTransitionBuilder,
  this.layoutBuilder = AnimatedSwitcher.defaultLayoutBuilder,
  this.style = const DefaultLoadingStyle(),
  this.builder,
})  : assert(
        indicatorStream != null || indicatorNotifier != null,
        "You must provide either a stream or value notifier",
      ),
      assert(
        indicatorNotifier == null || valueMapper != null,
        "If you are using a value notifier you must provider a function that will be called to get the state",
      ),
      super(key: key);