Closed yasinarik closed 3 years ago
@yasinarik Use the stable version Flutter 2.0.6. In the pre-release version, the leadingDistribution
property was added to TextStyle
, StyledText
does not yet support it.
@andyduke Thanks a lot. I have switched back to Flutter 2.0.6
and the error is gone. I hope this issue can help if anybody else faces the same error. CLosing it now.
Hi @yasinarik
It's unfortunate the Flutter SDK made a breaking change that appears to make it impossible for you to release a version that works on both Flutter stable and Flutter beta (since it is usually a good idea for plugins to be prepared for the next Flutter release before it happens rather than after.)
However, maybe this exposes some fragility in extending TextStyle
and you might consider just abandoning that subclass relationship and having your style class as its own class.
Or if you like keeping it as a subclass, would you at least consider making a prerelease version that works with the new version of TextStyle
? It is technically a bug.
The Flutter team does recommend app developers use the beta channel in certain instances because Flutter 2.0 was rushed out the door with things like integration testing broken (flutter_driver). From this page:
Which channel should I use?
We recommend using the stable branch.
That said, the beta branch should be fine. There is no extra level of testing that we do for stable than for beta, other than the extended stabilization period on the beta branch. So if there is something you want to use that is available on beta but not stable, feel free to consider using beta.
@ryanheise I am currently working on a new version of StyledText
that will not directly implement TextStyle
and will get rid of this fragility when breaking changes in newer Flutter versions.
BUG Description
I am trying to migrate to null safety and currently using:
Flutter 2.2.0-10.2.pre
&Flutter 2.0.6
Dart 2.12.4 (stable)
styled_text_package: 2.0.0
I get this error code and don't know what to do :(
Terminal Build Error Code