CustomButton.text constructor
const
CustomButton.text({
- Key? key,
- required String? text,
- required VoidCallback onPressed,
- Color? color,
Creates a text button with the specified text and onPressed callback
The color parameter can be used to override the default button color.
Example:
CustomButton.text(
text: 'Continue',
onPressed: () => Navigator.of(context).push(...),
color: Theme.of(context).primaryColor,
)
Implementation
const CustomButton.text({
super.key,
required this.text,
required this.onPressed,
this.color,
}) : type = CustomButtonType.text,
icon = null;