SkeletonTheme class
Predefined color themes for skeleton loading.
- Available extensions
Constructors
- SkeletonTheme({required Color baseColor, required Color highlightColor, double borderRadius = 4.0})
-
const
Properties
- baseColor → Color
-
Base color for skeleton elements.
final
- borderRadius → double
-
Default border radius.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highlightColor → Color
-
Highlight color for shimmer effect.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{Color? baseColor, Color? highlightColor, double? borderRadius}) → SkeletonTheme - Copies this theme with optional overrides.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toConfig(
{bool shimmer = true, Duration? shimmerDuration, bool enableCache = true, bool debugMode = false, bool gracefulFallback = true}) → dynamic -
Available on SkeletonTheme, provided by the SkeletonThemeExtension extension
Converts this theme to a SkeletonConfig. Requires import of skeleton_context.dart for SkeletonConfig class. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
allThemes
→ List<
SkeletonTheme> -
Gets all available theme presets.
no setter
Static Methods
-
custom(
{required Color baseColor, required Color highlightColor, double borderRadius = 4.0}) → SkeletonTheme - Creates a custom theme.
-
fromMaterialTheme(
ThemeData theme) → SkeletonTheme - Creates a theme from Material Theme colors.
-
fromPrimaryColor(
Color color, {bool isDark = false}) → SkeletonTheme - Creates a theme from primary color.
Constants
- dark → const SkeletonTheme
- Default dark theme.
- darkBlue → const SkeletonTheme
- Dark blue theme.
- darkContrast → const SkeletonTheme
- Dark theme with more contrast.
- darkGreen → const SkeletonTheme
- Dark green theme.
- darkPurple → const SkeletonTheme
- Dark purple theme.
- facebook → const SkeletonTheme
- Facebook-like theme.
- forest → const SkeletonTheme
- Forest gradient theme.
- instagram → const SkeletonTheme
- Instagram-like theme.
- light → const SkeletonTheme
- Default light grey theme.
- lightAmber → const SkeletonTheme
- Light amber theme.
- lightBlue → const SkeletonTheme
- Light blue theme.
- lightContrast → const SkeletonTheme
- Light grey theme with more contrast.
- lightGreen → const SkeletonTheme
- Light green theme.
- lightPurple → const SkeletonTheme
- Light purple theme.
- linkedin → const SkeletonTheme
- LinkedIn-like theme.
- materialYouPrimary → const SkeletonTheme
- Material You primary theme.
- materialYouSecondary → const SkeletonTheme
- Material You secondary theme.
- materialYouTertiary → const SkeletonTheme
- Material You tertiary theme.
- ocean → const SkeletonTheme
- Ocean gradient theme.
- sunset → const SkeletonTheme
- Sunset gradient theme.
- twitter → const SkeletonTheme
- Twitter-like theme.