@@ -1152,39 +1152,41 @@ class _CompactActionButtonState extends State<_CompactActionButton>
11521152 horizontal: hasLabel ? 10 : 8 ,
11531153 vertical: 6 ,
11541154 ),
1155- child: FittedBox (
1156- fit: BoxFit .scaleDown,
1157- child: Row (
1158- mainAxisAlignment: MainAxisAlignment .center,
1159- mainAxisSize: MainAxisSize .min,
1160- children: [
1161- Icon (
1162- widget.icon,
1163- size: 18 ,
1164- color: showColor ? effectiveColor : Colors .grey.shade400,
1165- ),
1166- // Animated label - show when label is provided
1167- AnimatedSize (
1168- duration: const Duration (milliseconds: 200 ),
1169- curve: Curves .easeInOut,
1170- child: hasLabel
1171- ? Row (
1172- mainAxisSize: MainAxisSize .min,
1173- children: [
1174- const SizedBox (width: 5 ),
1175- Text (
1176- widget.label! ,
1177- style: TextStyle (
1178- fontSize: 11 ,
1179- fontWeight: widget.isActive ? FontWeight .w600 : FontWeight .w500,
1180- color: showColor ? effectiveColor : Colors .grey.shade400,
1155+ child: Center (
1156+ child: FittedBox (
1157+ fit: BoxFit .scaleDown,
1158+ child: Row (
1159+ mainAxisAlignment: MainAxisAlignment .center,
1160+ mainAxisSize: MainAxisSize .min,
1161+ children: [
1162+ Icon (
1163+ widget.icon,
1164+ size: 18 ,
1165+ color: showColor ? effectiveColor : Colors .grey.shade400,
1166+ ),
1167+ // Animated label - show when label is provided
1168+ AnimatedSize (
1169+ duration: const Duration (milliseconds: 200 ),
1170+ curve: Curves .easeInOut,
1171+ child: hasLabel
1172+ ? Row (
1173+ mainAxisSize: MainAxisSize .min,
1174+ children: [
1175+ const SizedBox (width: 5 ),
1176+ Text (
1177+ widget.label! ,
1178+ style: TextStyle (
1179+ fontSize: 11 ,
1180+ fontWeight: widget.isActive ? FontWeight .w600 : FontWeight .w500,
1181+ color: showColor ? effectiveColor : Colors .grey.shade400,
1182+ ),
11811183 ),
1182- ) ,
1183- ],
1184- )
1185- : const SizedBox . shrink ( ),
1186- ) ,
1187- ] ,
1184+ ] ,
1185+ )
1186+ : const SizedBox . shrink (),
1187+ ),
1188+ ] ,
1189+ ) ,
11881190 ),
11891191 ),
11901192 ),
0 commit comments