SkeletonConfig class
SkeletonConfig global configuration for SkeletonLoader that allows you to set values by default for the entire application, reducing the need to pass the same parameters repeatedly.
Example usage:
SkeletonConfig.configure(
baseColor: Colors.grey[300],
highlightColor: Colors.white,
shimmerDuration: Duration(milliseconds: 1000),
);
Properties
- defaultBaseColor → Color
-
Default base color for all skeletons
final
- defaultHighlightColor → Color
-
Default highlight color for the shimmer effect
final
- defaultShimmerDuration → Duration
-
Default duration for the shimmer animation
final
- defaultTransitionDuration → Duration
-
Default duration for the transition between skeleton and content
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → SkeletonConfig
-
LAZY LOADINGGets the singleton instance of the configuration It is only created when it is needed for the first timeno setter
Static Methods
-
configure(
{Color? baseColor, Color? highlightColor, Duration? shimmerDuration, Duration? transitionDuration}) → void - SkeletonConfig global configuration for SkeletonLoader that allows you to set values by default for the entire application, reducing the need to pass the same parameters repeatedly.
-
reset(
) → void -
UTILITYResets the configuration to the default values