Reputation: 706
I have a textfield and I want to change the font size of it because my application will be available for both iPad and mobile phones. The font size of the textfield is good for mobile phones but too small for iPad. How can I change it?
Upvotes: 7
Views: 19941
Reputation: 1862
Use style under TextField
TextField(
style:TextStyle(fontSize:10),
//want to change the style for label and hint then
decoration:InputDecoration(
labelStyle:TextStyle(fontSize:10),
hintStyle: TextStyle(fontSize:10),
)
)
Upvotes: 8
Reputation: 17824
You can use the style property:
Text(
'Bronze Master',
style: TextStyle(
fontSize: 8,
color: Colors.blue.shade700,
fontWeight: FontWeight.w600,
),
),
You should note that this font size is relative and the actual font size you see on your device will be based on the device's font size settings. This is also a really good way to figure out where you have overflow issue.
Upvotes: 9
Reputation: 706
I found it. The font size of the TextField can be changed through its style property
Upvotes: 4