File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed
modules/addOrUpdateAlarm/views Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,9 @@ class AddOrUpdateAlarmView extends GetView<AddOrUpdateAlarmController> {
8080 controller.timeToAlarm.value.toString (),
8181 },
8282 ),
83- style: Theme .of (context).textTheme.titleSmall,
83+ style: Theme .of (context)
84+ .textTheme
85+ .titleSmall,
8486 ),
8587 ),
8688 ),
@@ -240,6 +242,7 @@ class AddOrUpdateAlarmView extends GetView<AddOrUpdateAlarmController> {
240242 .selectedTime
241243 .value
242244 .minute,
245+
243246 );
244247 inputTimeController
245248 .inputHrsController
@@ -521,16 +524,14 @@ class AddOrUpdateAlarmView extends GetView<AddOrUpdateAlarmController> {
521524 .value;
522525 },
523526 itemWidth:
524- width * 0.17 ,
527+ width * 0.2 ,
525528 selectedTextStyle:
526529 Theme .of (
527530 context)
528531 .textTheme
529532 .displayLarge!
530533 .copyWith (
531- fontSize:
532- controller.homeController.scalingFactor *
533- 40 ,
534+ fontSize: Utils .getFontSize (context),
534535 fontWeight:
535536 FontWeight
536537 .bold,
@@ -542,10 +543,9 @@ class AddOrUpdateAlarmView extends GetView<AddOrUpdateAlarmController> {
542543 .textTheme
543544 .displayMedium!
544545 .copyWith (
545- fontSize: controller
546- .homeController
547- .scalingFactor *
548- 20 ,
546+ fontSize:
547+ Utils .getFontSize (
548+ context),
549549 color: themeController
550550 .primaryDisabledTextColor
551551 .value,
Original file line number Diff line number Diff line change @@ -826,4 +826,8 @@ class Utils {
826826 return parts[0 ].substring (0 , 2 );
827827 }
828828 }
829+ static double getFontSize (BuildContext context) {
830+ final width = MediaQuery .of (context).size.width;
831+ return width < 360 ? 14 : 30 ;
832+ }
829833}
You can’t perform that action at this time.
0 commit comments