small static method
dynamic
small({
- Widget? child,
- String? text,
- MaterialStateProperty<
Color?> ? color, - List<
MaterialStateProperty< ? colors,Color> > - bool uppercase = true,
- bool busy = false,
- Color? busyColor,
- required void onPressed(),
- Duration? loadingDebounce,
- BorderRadius? borderRadius,
- bool guessTextColor = true,
- EdgeInsets? padding,
- bool disabled = false,
- Key? key,
Implementation
static small({
Widget? child,
String? text,
final MaterialStateProperty<Color?>? color,
final List<MaterialStateProperty<Color>>? colors,
final bool uppercase = true,
bool busy = false,
Color? busyColor,
required void Function() onPressed,
Duration? loadingDebounce,
BorderRadius? borderRadius,
bool guessTextColor = true,
EdgeInsets? padding,
bool disabled = false,
Key? key,
}) {
assert(child == null || text == null);
if (text != null) {
return ContainedButton.text(
text,
color: color,
colors: colors,
minWidth: 164,
height: 48,
uppercase: uppercase,
onPressed: onPressed,
busy: busy,
busyColor: busyColor,
loadingDebounce: loadingDebounce,
borderRadius: borderRadius,
guessTextColor: guessTextColor,
padding: padding,
disabled: disabled,
key: key,
);
}
return Container(
constraints: BoxConstraints(maxWidth: 164),
child: ContainedButton(
color: color,
colors: colors,
child: child,
minWidth: 164,
height: 48,
onPressed: onPressed,
busy: busy,
busyColor: busyColor,
loadingDebounce: loadingDebounce,
borderRadius: borderRadius,
guessTextColor: guessTextColor,
padding: padding,
disabled: disabled,
key: key,
),
);
}