ScreenLoadingIndicator class
A widget to be used to render a loading screen this will be useful to render a transition when screen navigation is occurring and a guard is processing async logic
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ScreenLoadingIndicator
Constructors
-
ScreenLoadingIndicator.new({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)?}) -
const
Properties
- builder → Widget Function(BuildContext context)?
-
A function that will be used to build the loading indicator overlay if not provided a default one will be used
that can be customized with the DefaultLoadingStyle
final
- child → Widget
-
Provide your inner widget that will be shown when not loading
final
- duration → Duration
-
Provide a transition duration
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- indicatorNotifier → ValueNotifier?
-
A notifier to add an internal listener that will be used to act on loading state changes
You must define a valueMapper for this
final
-
indicatorStream
→ Stream<
bool> ? -
An stream that will be used to subscribe to the loading state
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- layoutBuilder → AnimatedSwitcherLayoutBuilder
-
A function that wraps all of the children that are transitioning out, and
the child that's transitioning in, with a widget that lays all of them
out. This is called every time this widget is built. The function must not
return null.
final
- preventPop → bool
-
If true, the screen will not be able to be popped when the loading indicator is shown
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → DefaultLoadingStyle
-
Defines the style of the builder
final
- transitionBuilder → AnimatedSwitcherTransitionBuilder
-
A function that wraps a new child with an animation that transitions
the child in when the animation runs in the forward direction and out
when the animation runs in the reverse direction. This is only called
when a new child is set (not for each build), or when a new
transitionBuilder is set. If a new transitionBuilder is set, then
the transition is rebuilt for the current child and all previous children
using the new transitionBuilder. The function must not return null.
final
- type → ScreenLoadingIndicatorType
-
final
- valueMapper → bool Function()?
-
Every time the indicatorNotifier triggers this callback will be processed to get the indicator/loading state
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ScreenLoadingIndicator> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
defaultLoaderBuilder(
DefaultLoadingStyle style) → Widget -
defaultLoaderTransitionBuilder(
Widget child, Animation< double> animation) → Widget