andyduke / styled_text_package

Text widget with formatted text using tags. Makes it easier to use formatted text in multilingual applications.
https://pub.dev/packages/styled_text
BSD 3-Clause "New" or "Revised" License
74 stars 48 forks source link

Custom Style: No named parameter with the name 'overflow' #45

Closed guibsonarc closed 2 years ago

guibsonarc commented 2 years ago

I find this error when running the project using this code snippet with flutter 2.2.1

Code snippet: StyledText( text: 'Example: <b>bold</b> text.', tags: { 'b': StyledTextTag(style: TextStyle(fontWeight: FontWeight.bold)), }, )

Error: ../../../.pub-cache/hosted/pub.dartlang.org/styled_text-3.0.4/lib/custom_style.dart:69:7: Error: No named parameter with the name 'overflow'. overflow: overflow,
^^^^^^^^
../../../.pub-cache/hosted/pub.dartlang.org/styled_text-3.0.4/lib/custom_style.dart:138:7: Error: No named parameter with the name 'overflow'. overflow: overflow,
^^^^^^^^
../../../.pub-cache/hosted/pub.dartlang.org/styled_text-3.0.4/lib/custom_style.dart:253:39: Error: The getter 'overflow' isn't defined for the class 'TextStyle'.

FAILURE: Build failed with an exception.

BUILD FAILED in 14s

andyduke commented 2 years ago

@guibsonarc For Flutter 2.2.x you need to use StyledText 3.0.2. If you want to use a more recent version of StyledText, then you need to update Flutter to version 2.5.x.

guibsonarc commented 2 years ago

@andyduke Thank you, worked fine!