File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
lib/app/modules/addOrUpdateAlarm Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ class AddOrUpdateAlarmController extends GetxController {
7272 final mathsSliderValue = 0.0 .obs;
7373 final mathsDifficulty = Difficulty .Easy .obs;
7474 final isMathsEnabled = false .obs;
75- final numMathsQuestions = 1 . obs;
75+ final numMathsQuestions = 0 . obs;
7676 final MapController mapController = MapController ();
7777 final selectedPoint = LatLng (0 , 0 ).obs;
7878 final RxList markersList = [].obs;
Original file line number Diff line number Diff line change @@ -111,15 +111,15 @@ class MathsChallenge extends StatelessWidget {
111111 ],
112112 ),
113113 Obx (
114- () => Padding (
115- padding: const EdgeInsets .symmetric (vertical : 10.0 ),
114+ () => Padding (
115+ padding: const EdgeInsets .only (bottom : 10.0 ),
116116 child: Row (
117117 mainAxisAlignment: MainAxisAlignment .center,
118118 crossAxisAlignment: CrossAxisAlignment .center,
119119 children: [
120120 NumberPicker (
121121 value: controller.numMathsQuestions.value,
122- minValue: 1 ,
122+ minValue: 0 ,
123123 maxValue: 100 ,
124124 onChanged: (value) {
125125 Utils .hapticFeedback ();
@@ -152,7 +152,11 @@ class MathsChallenge extends StatelessWidget {
152152 ),
153153 onPressed: () async {
154154 Utils .hapticFeedback ();
155- controller.isMathsEnabled.value = true ;
155+ if (controller.numMathsQuestions.value != 0 ) {
156+ controller.isMathsEnabled.value = true ;
157+ } else {
158+ controller.isMathsEnabled.value = false ;
159+ }
156160 Get .back ();
157161 },
158162 ),
@@ -191,7 +195,7 @@ class MathsChallenge extends StatelessWidget {
191195 children: [
192196 Obx (
193197 () => Text (
194- controller.isMathsEnabled == true
198+ controller.isMathsEnabled.value == true
195199 ? Utils .getDifficultyLabel (controller.mathsDifficulty.value)
196200 .tr
197201 : 'Off' .tr,
You can’t perform that action at this time.
0 commit comments