simc / auto_size_text

Flutter widget that automatically resizes text to fit perfectly within its bounds.
https://pub.dev/packages/auto_size_text
MIT License
2.06k stars 240 forks source link

Required maxLines set to 1 to work in App Bar title #74

Open garyodonoghue opened 4 years ago

garyodonoghue commented 4 years ago

Steps to Reproduce Changing Text to AutosizeText has no effect on the title in AppBar, needed to set maxLines to 1, maybe this should be the default value for max lines?

Code sample

return AppBar(
    title: AutoSizeText(
            "Some reeeeeeeeeeeeaaaaaalllly long title ",
//  maxLines: 1, ---> Setting this causes the text to resize to the default min font size, otherwise nothing changes
          )
  );

Version Flutter 1.22.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 8874f21e79 (6 days ago) • 2020-10-29 14:14:35 -0700 Engine • revision a1440ca392 Tools • Dart 2.10.3

auto_size_text version: "2.1.0"