Bone class
- Inheritance
Constructors
- Bone({Key? key, required Widget child, double width = double.infinity, required double height, Color baseColor = const Color(0xFFE0E0E0), Color highlightColor = const Color(0xFFF5F5F5), BorderRadiusGeometry? borderRadius = const BorderRadius.all(Radius.circular(0)), BoneTransition? transition, Duration period = const Duration(milliseconds: 1500), ShimmerDirection direction = ShimmerDirection.ltr})
-
A constructor create a
single Bone with
width
andheight
-
A convenient constructor provides an easy and convenient way to create a
a Bone which hide the
child
when Skeleton.isShown is true, and vice versa -
Bone.multiple({Key? key, required Widget child, required int number, double width = double.infinity, double height = 30, double spacing = 8, List<
double> variants = const [1], Color baseColor = const Color(0xFFE0E0E0), Color highlightColor = const Color(0xFFF5F5F5), BorderRadiusGeometry? borderRadius = const BorderRadius.all(Radius.circular(0)), BoneTransition? transition, Duration period = const Duration(milliseconds: 1500), ShimmerDirection direction = ShimmerDirection.ltr}) -
A convenient constructor provides an easy and convenient way to create a
multi Bone with
width
andheight
are the size of each Bone
Properties
- baseColor → Color
-
The background color of a bone
final
- borderRadius → BorderRadiusGeometry?
-
The border radius of a bone
final
- child → Widget
-
The widget will be shown when Skeleton.isShown is false
final
- direction → ShimmerDirection
-
It controls the direction of shimmer effect. The default value
is ShimmerDirection.ltr.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
The height of a bone
final
- highlightColor → Color
-
The shimmer color
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- number → int
-
The number of bones will be generated
final
- period → Duration
-
It controls the speed of shimmer effect. The default value is 1500
milliseconds.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spacing → double
-
The spacing between bones
Only effect when number is greater than 1
final
- transition → BoneTransition?
-
The showing transition when Skeleton.isShown is false
final
-
variants
→ List<
double> -
The list of variant of bone's width
If the size of variants is smaller than number of bones,
it will takes the last variant for the rest bones
final
- width → double
-
The width of a bone
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _BoneState -
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