auto_size_text icon indicating copy to clipboard operation
auto_size_text copied to clipboard

Fix Flutter 3.24 and later. Support textScaler in favor of the deprecated textScaleFactor. Upgrade the demo project and dependencies

Open mlb5000 opened this issue 1 year ago • 9 comments

This is primarily to fix the issue described here, which can cause crashes and failed rendering on Flutter 3.24.0 and later. I have tested this against Flutter 3.24.3 and went through each example on the Demo app, which appeared to function exactly as we would want.

mlb5000 avatar Sep 17 '24 19:09 mlb5000

this package does not seem to be supported for last 2 years

vasilich6107 avatar Sep 24 '24 12:09 vasilich6107

Any update @simc @pdblasi-google ?

plchekspend avatar Nov 14 '24 10:11 plchekspend

Since this repo has been unmaintained for a couple of years now, I decided to fork it and merge all the outstanding PR's: https://github.com/FaFre/auto_size_text/blob/master/CHANGELOG.md

The package also has been pushed to pub: https://pub.dev/packages/flutter_auto_size_text

FaFre avatar Feb 23 '25 19:02 FaFre

@FaFre the auto sizing of the text is s bit unpredictable and confronts with accessibility so there are some disadvantages of using it

vasilich6107 avatar Feb 23 '25 19:02 vasilich6107

@vasilich6107 is this an ongoing issue on the flutter side? TextScaler is the official replacement of the deprecated textScaleFactor which will be probably removed in one of the upcoming releases. If there are issues with it, we need to report them to the flutter team.

For my part I checked it in the demo app and ran some test in my app (pretty tight use case) and I didn't had any issues with latest flutter release.

FaFre avatar Feb 23 '25 19:02 FaFre

@FaFre does your fork support AutoSizeGroup? I gave it a try but I wasn't able to find the class, I'm not sure if there's a different replacement for that

juanmanjarres avatar Feb 26 '25 17:02 juanmanjarres

@juanmanjarres There is currently no replacement for that one. It has been removed in the rewrite I merged. Maybe you can have a look into into and check if it is difficult to rewrite as well? AI should be pretty helpful here, given the old and new code of the rewritten files as references.

FaFre avatar Feb 27 '25 12:02 FaFre

@juanmanjarres There is currently no replacement for that one. It has been removed in the rewrite I merged. Maybe you can have a look into into and check if it is difficult to rewrite as well? AI should be pretty helpful here, given the old and new code of the rewritten files as references.

Thanks for the reply! Yeah I'll give that a try and see if it works, I'll raise a PR on your repo if that's the case

juanmanjarres avatar Feb 27 '25 21:02 juanmanjarres

Hi @FaFre , I reviewed your package but couldn't find the SelectableAutoSize widget code that was included in your last version. Could you please share it here or release a new version with it? Thanks!

plchekspend avatar Mar 19 '25 05:03 plchekspend