Hello guys how are you all? Hope you all are fine. As we know RaisedButton is deprecated and the Elevated button is replacing Raised Button widget with its new features. Here in this tutorial, we are going to learn How to give Text Style to ElevatedButton in Flutter?
How to give Text Style to ElevatedButton?
You can simply assign TextStyle property to ElevatedButton‘s style. ElevatedButton.styleFrom has textStyle property so you can simply use this property. Let’s explore examples.
Example
ElevatedButton(
onPressed: () {
print('Button Pressed');
},
child: Text('FlutterCorner.com'),
style: ElevatedButton.styleFrom(
textStyle: TextStyle(
color: Colors.black,
fontSize: 30,
fontStyle: FontStyle.normal,
),
),
),
Output

Faq
- How to give Text Style to ElevatedButton?
You can simply assign TextStyle property to ElevatedButton‘s style. ElevatedButton.styleFrom has textStyle property so you can simply use this property. Let’s explore examples.
- Text Style to ElevatedButton
You can simply assign TextStyle property to ElevatedButton‘s style. ElevatedButton.styleFrom has textStyle property so you can simply use this property. Let’s explore examples.
Summery
So it’s all About this tutorial. Hope this above-all solution helped you a lot. Comment below Your thoughts and your queries. Comment Below on your suggestion.
Leave a Reply