SkeletonConfig class

Configuration for skeleton loading appearance and behavior.

Constructors

SkeletonConfig({bool shimmer = true, Color? baseColor, Color? highlightColor, Duration shimmerDuration = const Duration(milliseconds: 1500), double borderRadius = 4.0, bool enableCache = true, bool debugMode = false, bool gracefulFallback = true})
Creates a skeleton configuration.
const

Properties

baseColor Color?
Base color for skeleton elements. Defaults to grey300.
final
borderRadius double
Default border radius for skeleton elements.
final
cacheHash int
Computes a hash code for caching purposes.
no setter
debugMode bool
Whether to enable debug mode with logging.
final
enableCache bool
Whether to cache skeleton sizes for better performance.
final
gracefulFallback bool
Whether to fallback gracefully for unsupported widgets.
final
hashCode int
The hash code for this object.
no setterinherited
highlightColor Color?
Highlight color for shimmer effect. Defaults to grey100.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shimmer bool
Whether to enable shimmer animation effect.
final
shimmerDuration Duration
Duration of one shimmer animation cycle.
final

Methods

copyWith({bool? shimmer, Color? baseColor, Color? highlightColor, Duration? shimmerDuration, double? borderRadius, bool? enableCache, bool? debugMode, bool? gracefulFallback}) SkeletonConfig
Creates a copy with optional overrides.
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

Constants

debugConfig → const SkeletonConfig
Debug configuration with logging enabled.
defaultConfig → const SkeletonConfig
Default configuration.
performanceConfig → const SkeletonConfig
Performance-optimized configuration without shimmer.