-
Notifications
You must be signed in to change notification settings - Fork 496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Text is not showing in release mode #593
Comments
I have the same issue Looks like the .sp value is returning zero for the text size. this is my yaml entry flutter_screenutil: ^5.9.3 |
how did you fix that? |
sorry didn't fix it, need to borrow the phone back and have another go. I centralized all my font sizes so only have one place to change from using .sp, I will focus back on it next week when I can get my hands on the phone. here is my centralization code, |
ok I might have found a solution, I have tested this on two phones that had issues and its working. But be interested if it works for you @ShafiMunshi. Basically I put in a delay at the start using future builder, not sure why it works but 100mSecs seems to make all the difference, haven't done a binary search to find out how much time it really needs but 100mSec is acceptable solution. class MyApp extends StatelessWidget { Future initializeScreenUtil(BuildContext context) async { // This widget is the root of your application. |
Thanks for your help. Your code works truly flawless. |
For getting adaptive text by depending on screen size, I used (.sp) in TextStyle in TextTheme. Using (.sp) inside text theme data , app works fine. But the issue occured when I tried to run it in release or profile mode. No text were showing in screen. Then i had to refine the textheme and remove all the (.sp).
From
To
The text was updated successfully, but these errors were encountered: