ContainedButton.large constructor

ContainedButton.large({
  1. Widget? child,
  2. String? text,
  3. WidgetStateProperty<Color?>? color,
  4. List<WidgetStateProperty<Color>>? colors,
  5. bool? uppercase,
  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

factory ContainedButton.large({
  Widget? child,
  String? text,
  final WidgetStateProperty<Color?>? color,
  final List<WidgetStateProperty<Color>>? colors,
  final bool? uppercase,
  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: 340,
      height: 48,
      uppercase: uppercase,
      onPressed: onPressed,
      busy: busy,
      busyColor: busyColor,
      loadingDebounce: loadingDebounce,
      borderRadius: borderRadius,
      guessTextColor: guessTextColor,
      padding: padding,
      disabled: disabled,
      key: key,
    );
  }
  return ContainedButton(
    color: color,
    colors: colors,
    child: child,
    minWidth: 340,
    height: 48,
    onPressed: onPressed,
    busy: busy,
    busyColor: busyColor,
    borderRadius: borderRadius,
    guessTextColor: guessTextColor,
    padding: padding,
    disabled: disabled,
    key: key,
  );
}