Shimmery class
Creates simple yet beautiful shimmer animations
Shimmer is very widely used as the default animation for skeleton loaders or placeholder widgets throughout the development community. Therefore, having an easy to use, yet customizable widget ready to use for Android, iOS and Web, gives developers an advantage to focus on their actual functionality, let shimmer make the loading experience smoother.
By default, the widget will select the preset config but it can be easily customized as shown below:
- @required child : accepts a child Widget over which the animation is to be displayed
- color : accepts a Color and sets the color of the animation overlay. Default value is Colors.white
- colorOpacity : accepts a double and sets the Opacity of the color of the animation overlay. Default value is
0.3
- enabled : accepts a bool which toggles the animation on/off. Default value is
true
- duration : accepts a Duration that would be the time period of animation. Default value is Duration(seconds: 3)
- interval : accepts a Duration that would be the interval between the repeating animation. Default value is Duration(seconds: 0)
- direction : accepts a ShimmerDirection and aligns the animation accordingly. Default value is ShimmerDirection.fromLBRT()
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- Shimmery
- Available Extensions
Constructors
Properties
- child → Widget
-
Accepts a child Widget over which the animation is to be displayed
final
- color → Color
-
Accepts a parameter of type Color and sets the color of the animation overlay. Default value is Colors.white
final
- colorOpacity → double
-
Accepts a parameter of type double and sets the Opacity of the color of the animation overlay. Default value is
0.3
final - direction → ShimmerDirection
-
Accepts a ShimmerDirection and aligns the animation accordingly. Default value is ShimmerDirection.fromLBRT()
final
- duration → Duration
-
Accepts a Duration that would be the time period of animation. Default value is Duration(seconds: 3)
final
- enabled → bool
-
Accepts a bool which toggles the animation on/off. Default value is
true
final - hashCode → int
-
The hash code for this object.
no setterinherited
- interval → Duration
-
Accepts a Duration that would be the interval between the repeating animation. Default value is Duration(seconds: 0) i.e. no interval
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< Shimmery> -
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}) → 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