ImageButton constructor
const
ImageButton({
- Key? key,
- double spaceSize = 16.0,
- required String title,
- TextStyle? textStyle,
- Color? color,
- BoxConstraints? constraints,
- EdgeInsetsGeometry? padding,
- Decoration? decoration,
- Icon? left,
- Icon? right,
- Icon? top,
- Icon? bottom,
- VoidCallback? onPressed,
Implementation
const ImageButton(
{Key? key,
/// 文字和图片间的间距
this.spaceSize = 16.0,
required this.title,
this.textStyle,
this.color,
this.constraints,
this.padding,
this.decoration,
this.left,
this.right,
this.top,
this.bottom,
this.onPressed})
: assert(title != null),
assert(
color == null || decoration == null,
'Cannot provide both a color and a decoration\n'
'To provide both, use "decoration: BoxDecoration(color: color)".'),
super(key: key);