ScreenLoadingIndicator constructor
const
ScreenLoadingIndicator({
- Key? key,
- Stream<
bool> ? indicatorStream, - ValueNotifier? indicatorNotifier,
- bool valueMapper()?,
- bool preventPop = true,
- ScreenLoadingIndicatorType type = ScreenLoadingIndicatorType.stack,
- required Widget child,
- Duration duration = const Duration(milliseconds: 500),
- AnimatedSwitcherTransitionBuilder transitionBuilder = AnimatedSwitcher.defaultTransitionBuilder,
- AnimatedSwitcherLayoutBuilder layoutBuilder = AnimatedSwitcher.defaultLayoutBuilder,
- DefaultLoadingStyle style = const DefaultLoadingStyle(),
- Widget builder(
- 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);