SkeletonLoaderBuilder class
SkeletonLoaderBuilderBuilder pattern to create SkeletonLoader with fluent syntax and configuration more intuitive. Reduces verbosity and improves developer experience.
Usage Example:
SkeletonLoaderBuilder()
.child(Text('Hello World'))
.loading(true)
.baseColor(Colors.grey[300])
.shimmerDuration(Duration(milliseconds: 1000))
.build()
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
baseColor(
Color color) → SkeletonLoaderBuilder -
BASE COLOR CONFIGURATIONSets the base color for the skeleton -
build(
) → SkeletonLoader -
VALIDATION AND CONSTRUCTIONBuilds the final SkeletonLoader with validations -
child(
Widget child) → SkeletonLoaderBuilder -
CHILD WIDGET CONFIGURATIONSets the widget to display when loading is complete -
darkTheme(
) → SkeletonLoaderBuilder -
DARK THEME CONFIGURATIONApplies a dark theme -
fastAnimation(
) → SkeletonLoaderBuilder -
FAST ANIMATION CONFIGURATIONApplies configuration for fast skeletons -
highlightColor(
Color color) → SkeletonLoaderBuilder -
HIGHLIGHT COLOR CONFIGURATIONSets the highlight color for the shimmer effect -
lightTheme(
) → SkeletonLoaderBuilder -
THEME CONFIGURATIONApplies a common light theme -
loading(
bool isLoading) → SkeletonLoaderBuilder -
LOADING STATE CONFIGURATIONSets whether to show the skeleton (true) or the actual content (false) -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shimmerDuration(
Duration duration) → SkeletonLoaderBuilder -
SHIMMER DURATION CONFIGURATIONSets the duration of the shimmer animation -
slowAnimation(
) → SkeletonLoaderBuilder -
SLOW ANIMATION CONFIGURATIONApplies configuration for slow and smooth skeletons -
toString(
) → String -
A string representation of this object.
inherited
-
transitionDuration(
Duration duration) → SkeletonLoaderBuilder -
TRANSITION DURATION CONFIGURATIONSets the duration of the transition between skeleton and content
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
dark(
{required Widget child, required bool isLoading}) → SkeletonLoader -
STATIC UTILITYQuick configuration with dark theme -
light(
{required Widget child, required bool isLoading}) → SkeletonLoader -
STATIC UTILITYQuick configuration with light theme -
quick(
{required Widget child, required bool isLoading, Color? baseColor, Color? highlightColor}) → SkeletonLoader -
STATIC UTILITYConvenience method for quick configuration