-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto size text does not auto-size text in the Flutter stable v1.2.1 #10
Comments
Please try wrapping your |
I've tried wrapping with a The text does resize with different width values, to a certain extent, but it still doesn't try to show the entire length of the string. It appears as if it's applying overflow truncation before resizing. here's my modified code (with SizedBox) and a screenshot of what I'm seeing on my screen. I also varied the text scaling factor on the device to test this. As seen in the screenshot, notice that the text is faded on the bottom. Does this mean that overflow has been applied to the text?
|
Thanks for the information. I'll investigate this problem. |
I sadly cannot reproduce your problem. I tried it with multiple flutter versions including class App extends StatefulWidget {
_AppState createState() => _AppState();
}
class _AppState extends State<App> {
@override
Widget build(BuildContext context) {
var stackContents = [
SizedBox(
width: 180,
child: Card(
margin: EdgeInsets.only(top: 12.0),
elevation: 4.0,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: AutoSizeText(
"hello kind sir, thank you, good bye",
maxLines: 1,
maxFontSize: 24.0,
overflow: TextOverflow.fade,
minFontSize: 2.0,
),
),
),
),
];
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text("Select Location"),
),
body: Stack(
children: stackContents,
),
),
);
}
} Maybe try it with an empty project. If you still have problem it would be nice if you could share a sample project so I can reproduce the problem. |
thanks for looking into this! this is a screenshot of the project on a Galaxy S9, with font size (on the device) 4th from the left. |
update: I think increasing the font size in the device itself is causing this problem, On Android devices, changing the device's display size (not font size) seem to work well. It's when I was changing the device's font size that this issue start to happen. The issue also occurs on iOS device when using Accesibility > Larger Text settings. |
ok I've done more investigation, and I see that flutter update did not cause this. |
Sorry for the late response, I'm very busy currently. It may take a few more days to fix this... |
I found the problem and fixed it. Thanks for your help. The new version (1.1.2) should be available soon. Please reopen the issue if it still doesn't work for you. |
it is not work with me inside Expanded |
It's pretty strange, I pass a variable to AutoSizeText widget and it not work, if i pass it a string it work! Don't work
Work:
PS: The Container is into a Column Flutter Channel stable, v1.12.13+hotfix.8 |
You have fix that? |
I was on Flutter Beta 1.0 for the longest time in one of my machines.
Today I upgraded to Flutter Stable v1.2.1, and seems that this plugin has lost its functionality.
Text is not being auto-sized properly, even with
maxLines
andminFontSize
specified.plugin version: 1.1.1
code snippet:
flutter doctor output:
The text was updated successfully, but these errors were encountered: