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

Breaking change on Flutter 2.5 #42

Closed Cosphy closed 2 years ago

Cosphy commented 2 years ago

Hi,

I Use your awesome package, but since the release of Flutter 2.5, it seems that there is a problem caused by some changes on flutter.

I Have this error:

../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/styled_text-3.0.2/lib/custom_style.dart:8:7: Error: The non-abstract class 'CustomStyle' is missing implementations for these members:

class CustomStyle with Diagnosticable implements TextStyle { ^^^^^^^^^^^ ../../../development/flutter/packages/flutter/lib/src/painting/text_style.dart:774:23: Context: 'TextStyle.overflow' is defined here. final TextOverflow? overflow; ^^^^^^^^ ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/styled_text-3.0.2/lib/custom_text_style.dart:34:7: Error: The non-abstract class 'CustomTextStyle' is missing implementations for these members:

class CustomTextStyle extends CustomStyle { ^^^^^^^^^^^^^^^ ../../../development/flutter/packages/flutter/lib/src/painting/text_style.dart:774:23: Context: 'TextStyle.overflow' is defined here. final TextOverflow? overflow; ^^^^^^^^ ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/styled_text-3.0.2/lib/custom_style.dart:17:13: Error: The method 'CustomStyle.apply' has fewer named arguments than those of overridden method 'TextStyle.apply'. TextStyle apply( ^ ../../../development/flutter/packages/flutter/lib/src/painting/text_style.dart:876:13: Context: This is the overridden method ('apply'). TextStyle apply({ ^ ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/styled_text-3.0.2/lib/custom_style.dart:17:13: Error: The method 'CustomStyle.apply' doesn't have the named parameter 'overflow' of overridden method 'TextStyle.apply'. TextStyle apply( ^ ../../../development/flutter/packages/flutter/lib/src/painting/text_style.dart:876:13: Context: This is the overridden method ('apply'). TextStyle apply({ ^ ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/styled_text-3.0.2/lib/custom_style.dart:85:13: Error: The method 'CustomStyle.copyWith' has fewer named arguments than those of overridden method 'TextStyle.copyWith'. TextStyle copyWith( ^ ../../../development/flutter/packages/flutter/lib/src/painting/text_style.dart:785:13: Context: This is the overridden method ('copyWith'). TextStyle copyWith({ ^ ../../../development/flutter/.pub-cache/hosted/pub.dartlang.org/styled_text-3.0.2/lib/custom_style.dart:85:13: Error: The method 'CustomStyle.copyWith' doesn't have the named parameter 'overflow' of overridden method 'TextStyle.copyWith'. TextStyle copyWith( ^ ../../../development/flutter/packages/flutter/lib/src/painting/text_style.dart:785:13: Context: This is the overridden method ('copyWith'). TextStyle copyWith({ ^

Maybe it's just a wrong manipulation on my side but is it possible to add the missing implementation ?

Thanks a lot for your time

Cosphy commented 2 years ago

Sorry I forgot to precise, this error is handle when I use:

StyledText( text: title, style: kFont14RegularPrimary, tags: { 'b': StyledTextTag(style: TextStyle(fontWeight: FontWeight.bold)), }, ),

iptodays commented 2 years ago

same +1

JigarKotak7 commented 2 years ago

I have the same Issue after upgrade to 2.5

kpk-i710 commented 2 years ago

same +1 after upgrade to 2.5

andyduke commented 2 years ago

A new version of StyledText 3.0.3 (compatible with Flutter 2.5) is already available on pub.dev.

DenisGL commented 2 years ago

Thanks a lot!

JigarKotak7 commented 2 years ago

Thank you very much!!