How to Style an ElevatedButton in Flutter¶
So how do you style an ElevatedButton in Flutter?
Glad you asked. This is the simplest way:
Of course, ButtonStyle has many properties.
As usual, the documentation is your friend:
Want a consistent style across all ElevatedButtons in your app?
Then set ThemeData.elevatedButtonTheme in your MaterialApp and you’re good to go:
Previous | Next |
---|---|
How to Generate Fake data with the Faker package | How to Validate a TextField in Flutter |
Last update:
18 septembre 2023
Created: 18 septembre 2023
Created: 18 septembre 2023