ContainedButton.text constructor

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

Implementation

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