small static method

dynamic small({
  1. Widget? child,
  2. String? text,
  3. Color? color,
  4. bool uppercase = true,
  5. bool busy = false,
  6. Color? busyColor,
  7. required void onPressed(),
  8. Duration? loadingDebounce,
  9. BorderRadius? borderRadius,
  10. bool? guessTextColor,
  11. EdgeInsets? padding,
  12. Key? key,
  13. bool disabled = false,
})

Implementation

static small({
  Widget? child,
  String? text,
  final Color? color,
  final bool uppercase = true,
  bool busy = false,
  Color? busyColor,
  required void Function() onPressed,
  Duration? loadingDebounce,
  BorderRadius? borderRadius,
  bool? guessTextColor,
  EdgeInsets? padding,
  Key? key,
  bool disabled = false,
}) {
  assert(child != null || text != null, "You must define either a child widget or  a text");
  if (text != null) {
    return OutlinedButton.text(
      text,
      color: color,
      minWidth: 164,
      height: 48,
      uppercase: uppercase,
      onPressed: onPressed,
      busy: busy,
      busyColor: busyColor,
      loadingDebounce: loadingDebounce,
      borderRadius: borderRadius,
      guessTextColor: guessTextColor,
      padding: padding,
      key: key,
      disabled: disabled,
    );
  }
  return Container(
    constraints: BoxConstraints(maxWidth: 164),
    child: OutlinedButton(
      color: color,
      child: child!,
      minWidth: 164,
      height: 48,
      onPressed: onPressed,
      busy: busy,
      busyColor: busyColor,
      loadingDebounce: loadingDebounce,
      borderRadius: borderRadius,
      guessTextColor: guessTextColor,
      padding: padding,
      key: key,
      disabled: disabled,
    ),
  );
}