-
-
Notifications
You must be signed in to change notification settings - Fork 261
Description
**if I restrict the AutoSizeText to maxLines: 1 it is working but there are some tabs with two word so I need the 2 Lines. But if I set it to maxLines 2 the one word ('calendar.toUpperCase()) won't shrink its size but brake the last letter two the second line. That happens also without AutoSizeText package.
How can I achieve that only complete words will be written in the next line and not a single letter?**
Please tell me exactly how to reproduce the problem you are running into.
return Padding(
padding: const EdgeInsets.all(2.0),
child: Container(
decoration: BoxDecoration(
color: isSelected ? theme.focusColor : theme.dividerColor,
borderRadius: const BorderRadius.all(
Radius.circular(10.0),
),
),
child: Material(
color: Colors.transparent,
child: InkWell(
borderRadius: BorderRadius.circular(10),
onTap: onTap,
child: Center(
child: AutoSizeText(
value.localizedValue(localizations!).toUpperCase(),
minFontSize: 10,
maxLines: 2,
textAlign: TextAlign.center,
style: isSelected
? theme.primaryTextTheme.caption
: theme.textTheme.caption,
),
),
),
),
),
);
Provide a few simple lines of code to show your problem.
Screenshots
If applicable, add screenshots to help explain your problem.
Version
- Flutter version: [e.g. 2.8.1]
- auto_size_text version: [e.g. 3.0.0]