ButtonAnimation
A customizable animated button with shimmer effects, snake borders, and loading states for Flutter.
Features
- Shimmer effect with configurable angle and duration.
- Animated borders with snake effects.
- Loading state support.
- Shadow effects on press.
Usage
ButtonAnimation(
onTap: () {},
child: Text(
"please peress me",
style: TextStyle(
color: Colors.white, fontWeight: FontWeight.bold, fontSize: 16),
),
shimmerAngle: Angle.left,
borderColor: Colors.greenAccent,
snakeColor: Colors.red,
borderRadius: 3,
endAngleBorder: 180,
colorShadow: Colors.black.withOpacity(0.2),
isOnClickColorShadow: Colors.black.withOpacity(0.2),
shimmerDuration: Duration(seconds: 2),
isShimmer: true,
borderDuration: Duration(seconds: 2),
colorCircularProgress: Colors.white,
)
Parameters
Parameter | Description | Default |
---|---|---|
shimmerAngle |
Direction of the shimmer effect | Angle.zero |
borderColor |
Color of the button border | Colors.transparent |
snakeColor |
Color of the snake animation | Color(0xffE0E0E0FF) |
borderRadius |
Corner radius of the button | 0 |
endAngleBorder |
Ending angle of the border animation | 180 |
isBorder |
Whether to show border | true |
isEnable |
Enable or disable the button | true |
isLoading |
Show loading indicator | false |
colorShadow |
Shadow color of the button | Colors.black.withOpacity(0.2) |
shimmerDuration |
Duration of the shimmer animation | Duration(seconds: 2) |
borderWidth |
Width of the border | 4 |
isShimmer |
Width of the border | true |
`borderDuration | Duration of the border animation | Duration(seconds: 2) |
`colorCircularProgress | Width of the border | Colors.white |
buttonColor |
Width of the border | Colors.amber |
`isOnClickColorShadow | Shadow color of the button is On Click | Colors.black.withOpacity(0.5) |