ContainedButton.text constructor

ContainedButton.text(
  1. String text, {
  2. Key? key,
  3. WidgetStateProperty<Color?>? color,
  4. GBButtonGradient? gradient,
  5. double? minWidth,
  6. double? height,
  7. bool uppercase = true,
  8. bool busy = false,
  9. Color? busyColor,
  10. required VoidCallback? onPressed,
  11. Duration? loadingDebounce,
  12. BorderRadius? borderRadius,
  13. bool guessTextColor = true,
  14. EdgeInsets? padding,
  15. bool disabled = false,
  16. ButtonStyle? style,
})

Implementation

factory ContainedButton.text(
  String text, {
  Key? key,
  WidgetStateProperty<Color?>? color,
  GBButtonGradient? gradient,
  double? minWidth,
  double? height,
  bool uppercase = true,
  bool busy = false,
  Color? busyColor,
  required VoidCallback? onPressed,
  Duration? loadingDebounce,
  BorderRadius? borderRadius,
  bool guessTextColor = true,
  EdgeInsets? padding,
  bool disabled = false,
  ButtonStyle? style,
}) {
  return ContainedButton(
    key: key,
    color: color,
    gradient: gradient,
    minWidth: minWidth,
    height: height,
    onPressed: onPressed,
    busy: busy,
    busyColor: busyColor,
    loadingDebounce: loadingDebounce,
    borderRadius: borderRadius,
    guessTextColor: guessTextColor,
    padding: padding,
    disabled: disabled,
    style: style,
    child: Text(uppercase ? text.toUpperCase() : text),
  );
}