BadButton.two constructor
BadButton.two({
- Key? key,
- double? width,
- double? height,
- EdgeInsets? margin,
- EdgeInsets? padding,
- BoxConstraints? constraints,
- Border? border,
- double borderRadius = 0,
- Color? fill,
- Alignment? alignment = Alignment.center,
- MainAxisSize mainAxisSize = MainAxisSize.min,
- required void onPressed(),
- required Widget left,
- required Widget right,
- double gap = 0.0,
In most case, child will be a Row contains two widget with a gap. (e.g. Prefix + Text
, Text + Suffix
)
Implementation
BadButton.two({
super.key,
this.width,
this.height,
this.margin,
this.padding,
this.constraints,
this.border,
this.borderRadius = 0,
this.fill,
this.alignment = Alignment.center,
MainAxisSize mainAxisSize = MainAxisSize.min,
required this.onPressed,
required Widget left,
required Widget right,
double gap = 0.0,
}) : child = Row(
mainAxisSize: mainAxisSize,
mainAxisAlignment: MainAxisAlignment.center,
children: [left, if (gap != 0) SizedBox(width: gap), right],
);