-
-
Notifications
You must be signed in to change notification settings - Fork 261
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Question
How to avoid AutoSizeText trying to resize itself when tapping on a checkbox that is placed in the same row.
Code sample
// Create days boxes widgets
List<Widget> createDaysBoxes() {
AutoSizeGroup textGroup =
AutoSizeGroup(); // Keep consistent font size for all days
List<Widget> daysBoxes = [];
data.checkedDays.forEach(
(day, isChecked) {
daysBoxes.add(
Expanded(
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
flex: 3,
child: Padding(
padding: const EdgeInsets.fromLTRB(10, 5, 0, 5),
child: AutoSizeText(
getDayString(day),
group: textGroup,
style: const TextStyle(fontSize: 40),
),
),
),
Expanded(
child:Checkbox(
checkColor: Colors.white,
value: data.checkedDays[day]![1],
onChanged: (bool? value) {
setState(() {
data.checkedDays[day]![1] = value!;
});
},
),
),
],
),
),
);
},
);
return daysBoxes;
}
Screenshot

-> in this screenshot, "Monday" and "Tuesday" are trying to automatically resize their fontsize each time I tap on a checkbox.
Version
- Flutter version: 2.5.3
- auto_size_text version: 3.0.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested