A Flutter custom common button that frequently use in flutter project.
Features
How to use it.
common_button
the default effects is Icons.favorite
CommonButton(),
// give some parameter
how-to-use-it
and you can also define custom use.
CommonButton(
onPress: _incrementCounter,
text: "Counter",
textAlign: Alignment.center,
tColor: Colors.white,
bgColor: Colors.orange,
isIcon: false,
customShape: 1,
),
parameters
parameter | description | default |
---|---|---|
customShape | 1 StadiumBorder,2 RoundedRectangleBorder, 3 CircleBorder | StadiumBorder |
bgColor | animation duration to change isLiked state | |
tColor | text color | |
isIcon | icon enable for true |