small static method

dynamic small({
  1. Widget? child,
  2. String? text,
  3. MaterialStateProperty<Color?>? color,
  4. List<MaterialStateProperty<Color>>? colors,
  5. bool uppercase = true,
  6. bool busy = false,
  7. Color? busyColor,
  8. required void onPressed(),
  9. Duration? loadingDebounce,
  10. BorderRadius? borderRadius,
  11. bool guessTextColor = true,
  12. EdgeInsets? padding,
  13. bool disabled = false,
  14. 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,
    ),
  );
}