Flutter iOS. Fonts looks different in debug simulator and release device
1,024
There is an option to scale Text in iOS settings (Settings -> General -> Accessibility -> Larger Text). This default OS solution, but if you want to block this inside your app you can do following
MaterialApp(
builder: (context, child) {
return MediaQuery(
child: child,
data: MediaQuery.of(context).copyWith(textScaleFactor: 1.0),
);
},
)
Author by
Dima Portenko
Open-minded software developer :) My YouTube channel - https://www.youtube.com/channel/UCReKeeIMZywvQoaZPZKzQbQ/
Updated on December 08, 2022Comments
-
Dima Portenko over 1 year
I've just noticed that Fonts looks different on the iOS simulator in debug mode and iOS device in release mode. It is kind of confusing. Any ideas why does it happen?
-
canister_exister over 5 yearsAre using iPhone 7 device as same as simulator?
-
Dima Portenko over 5 years@canister_exister yep, I’m using IPhone 7.
-
TonyMkenu over 5 yearscheck the "Text Size" - maybe is Larger Text, etc... :)
-
-
Dpedrinha over 4 yearsMan apparently I have a lot of elder users with increased text size and if this solution of yours work I'll be so happy because I'm getting tons of complains about too big texts.
-
Coronon over 3 yearsThank you so much for this hint. You just saved me a lot of headache.