CoderShakingIcon constructor
const
CoderShakingIcon({})
Creates a CoderShakingIcon widget.
You must provide at least one of svgAssetPath, imageAssetPath,
or iconData, otherwise an AssertionError will be thrown.
Implementation
const CoderShakingIcon({
super.key,
this.svgAssetPath, // ✅ Optional: SVG asset path (requires flutter_svg)
this.imageAssetPath, // ✅ Optional: Image asset path (e.g., PNG/JPG)
this.iconData, // ✅ Optional: Flutter built-in IconData
this.color, // Optional: Color to apply to the icon/image/SVG
this.size = 24, // Optional: Size of the icon/image in logical pixels
this.duration = const Duration(
milliseconds: 600,
), // Optional: One full shake cycle duration
this.shakeOffset = 4.0, // Optional: Max distance to move during shake
this.shakeDirection =
Axis.horizontal, // Optional: Shake along horizontal or vertical axis
this.blendMode =
BlendMode.srcIn, // Optional: Blend mode for SVG or image color filter
}) : assert(
svgAssetPath != null || imageAssetPath != null || iconData != null,
'Provide either svgAssetPath, imageAssetPath, or iconData.',
);