Sub6Resources / flutter_html

A Flutter widget for rendering static html as Flutter widgets (Will render over 80 different html tags!)
https://pub.dev/packages/flutter_html
MIT License
1.76k stars 815 forks source link

[BUG] can't change text decoration color anymore #1361

Open eEQK opened 9 months ago

eEQK commented 9 months ago

Similarly to my last comment here: https://github.com/Sub6Resources/flutter_html/issues/1357

I think I've found a regression in regard to text decoration

After upgrading from alpha6 to beta2 it's not possible to change text decoration color anymore

alpha6:

          'a': Style.fromTextStyle(
            const TextStyle(
              color: AppColors.link,
              decorationColor: AppColors.link,
              decoration: TextDecoration.underline,
            ),
          ),

beta2, code unchanged but also tried using style directly, same result:

          'a': Style(
            color: AppColors.link,
            textDecorationColor: AppColors.link,
            textDecoration: TextDecoration.underline,
          ),
❯ flutter --version
Flutter 3.13.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision efbf63d9c6 (2 days ago) • 2023-08-15 21:05:06 -0500
Engine • revision 1ac611c64e
Tools • Dart 3.1.0 • DevTools 2.25.0
eEQK commented 9 months ago

As a temporary fix, overriding flutter_layout_grid for alpha6 release, although not perfect for sure, does make it runnable with the newest flutter version

dependency_overrides:
  flutter_layout_grid: 2.0.4
eEQK commented 9 months ago

For whatever setting the decoration color for a tag does not work, and you have to set it via other tags (in my case body works but in other places I had to set h1 - didn't investigate far enough to know what's the rule behind it)

          'body': Style(
            textDecorationColor: Colors.blue,
          ),

keeping this open though

bytebubbles commented 1 week ago

same question