Skip to content

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

Open
mlb5000 wants to merge 2 commits into
simc:masterfrom
mlb5000:support_textscaler
Open

Fix Flutter 3.24 and later. Support textScaler in favor of the deprecated textScaleFactor. Upgrade the demo project and dependencies#148
mlb5000 wants to merge 2 commits into
simc:masterfrom
mlb5000:support_textscaler

Conversation

@mlb5000

@mlb5000 mlb5000 commented Sep 17, 2024

Copy link
Copy Markdown

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.

* Remove use of deprecated `textScaleFactor` in place of the preferred `TextScaler` (https://docs.flutter.dev/release/breaking-changes/deprecate-textscalefactor)
* Upgrade required Dart SDK versions, make necessary project updates on Android demo app
@mlb5000 mlb5000 changed the title Support textScaler in favor of the deprecated textScaleFactor. Upgrade the demo project and dependencies Fix Flutter 3.24 and later. Support textScaler in favor of the deprecated textScaleFactor. Upgrade the demo project and dependencies Sep 17, 2024
@vasilich6107

Copy link
Copy Markdown

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

@plchekspend

Copy link
Copy Markdown

Any update @simc @pdblasi-google ?

@FaFre

FaFre commented Feb 23, 2025

Copy link
Copy Markdown

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

@vasilich6107

Copy link
Copy Markdown

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

@FaFre

FaFre commented Feb 23, 2025

Copy link
Copy Markdown

@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.

@juanmanjarres

Copy link
Copy Markdown

@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

@FaFre

FaFre commented Feb 27, 2025

Copy link
Copy Markdown

@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.

@juanmanjarres

juanmanjarres commented Feb 27, 2025

Copy link
Copy Markdown

@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

@plchekspend

plchekspend commented Mar 19, 2025

Copy link
Copy Markdown

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants