Creating a ButtonStyle for a TextButton can be done using TextButton. styleFrom . For defining a style for a specific button, you can pass ButtonStyle as style parameter in the constructor of TextButton . You can pass ButtonStyle as both ThemeData ‘s textButtonTheme and TextButton ‘s style parameters.
How do you style a text button in flutter?
Creating a ButtonStyle for a TextButton can be done using TextButton. styleFrom . For defining a style for a specific button, you can pass ButtonStyle as style parameter in the constructor of TextButton . You can pass ButtonStyle as both ThemeData ‘s textButtonTheme and TextButton ‘s style parameters.