You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TextStyle only has a const constructor, so I can't create one using a runtime value like:
That's not true, just don't use const. const constructor means "may be constructed const," it's not required. In the example you posted, it is likely that some parent is const placing you in a const context
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
jonahwilliams commentedon Aug 14, 2019
That's not true, just don't use
const.constconstructor means "may be constructed const," it's not required. In the example you posted, it is likely that some parent isconstplacing you in aconstcontextfeinstein commentedon Aug 14, 2019
Sorry, you are right, I was editing old code and didn't see it, my apologies.
github-actions commentedon Aug 28, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.