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

SkeletonLoaderBuilder()

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 CONFIGURATION Sets the base color for the skeleton
build() SkeletonLoader
VALIDATION AND CONSTRUCTION Builds the final SkeletonLoader with validations
child(Widget child) SkeletonLoaderBuilder
CHILD WIDGET CONFIGURATION Sets the widget to display when loading is complete
darkTheme() SkeletonLoaderBuilder
DARK THEME CONFIGURATION Applies a dark theme
fastAnimation() SkeletonLoaderBuilder
FAST ANIMATION CONFIGURATION Applies configuration for fast skeletons
highlightColor(Color color) SkeletonLoaderBuilder
HIGHLIGHT COLOR CONFIGURATION Sets the highlight color for the shimmer effect
lightTheme() SkeletonLoaderBuilder
THEME CONFIGURATION Applies a common light theme
loading(bool isLoading) SkeletonLoaderBuilder
LOADING STATE CONFIGURATION Sets 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 CONFIGURATION Sets the duration of the shimmer animation
slowAnimation() SkeletonLoaderBuilder
SLOW ANIMATION CONFIGURATION Applies configuration for slow and smooth skeletons
toString() String
A string representation of this object.
inherited
transitionDuration(Duration duration) SkeletonLoaderBuilder
TRANSITION DURATION CONFIGURATION Sets 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 UTILITY Quick configuration with dark theme
light({required Widget child, required bool isLoading}) SkeletonLoader
STATIC UTILITY Quick configuration with light theme
quick({required Widget child, required bool isLoading, Color? baseColor, Color? highlightColor}) SkeletonLoader
STATIC UTILITY Convenience method for quick configuration