ShadcnSkeletonizerConfigLayer constructor

const ShadcnSkeletonizerConfigLayer({
  1. Key? key,
  2. required ThemeData theme,
  3. required Widget child,
  4. Duration? duration,
  5. Color? fromColor,
  6. Color? toColor,
  7. bool? enableSwitchAnimation,
})

Creates a ShadcnSkeletonizerConfigLayer.

The theme and child parameters are required for proper skeleton configuration and content wrapping. Override parameters allow for fine-tuned control of skeleton appearance at the layer level.

Parameters:

  • theme (ThemeData, required): Theme for skeleton configuration calculation
  • child (Widget, required): Content to wrap with skeleton configuration
  • duration (Duration?, optional): Pulse animation duration override
  • fromColor (Color?, optional): Pulse start color override
  • toColor (Color?, optional): Pulse end color override
  • enableSwitchAnimation (bool?, optional): Switch animation behavior override

Example:

ShadcnSkeletonizerConfigLayer(
  theme: Theme.of(context),
  duration: Duration(milliseconds: 1200),
  child: MyContentWidget(),
);

Implementation

const ShadcnSkeletonizerConfigLayer({
  super.key,
  required this.theme,
  required this.child,
  this.duration,
  this.fromColor,
  this.toColor,
  this.enableSwitchAnimation,
});