JCImageButton constructor
JCImageButton({
- Color bgColor = Colors.blue,
- double cornerRadius = 2,
- String imageAssets = "",
- double imageSize = 16,
- String titleString = "",
- Color titleColor = Colors.white,
- double titleSize = 16,
- FontWeight fontweight = FontWeight.w400,
- double interval = 8,
- EdgeInsetsGeometry? padding,
- JCImagePossition possiton = JCImagePossition.left,
- VoidCallback? callBack,
Implementation
JCImageButton(
{
// 背景颜色 圆角
this.bgColor = Colors.blue,
this.cornerRadius = 2,
// 图片路劲 大小
this.imageAssets = "",
this.imageSize = 16,
// 字体
this.titleString = "",
this.titleColor = Colors.white,
this.titleSize = 16,
this.fontweight = FontWeight.w400,
// 文字和图片间隔、 padding
this.interval = 8,
EdgeInsetsGeometry? padding,
// 位置 回调
this.possiton = JCImagePossition.left,
VoidCallback? callBack, // 回调
}) {
this.padding = padding ?? EdgeInsets.fromLTRB(72, 8, 72, 8);
this.callBack = callBack ??
() {
print("默认回调");
};
}