Skip to content

Commit 8c236b8

Browse files
authored
changes (#759)
1 parent de804b2 commit 8c236b8

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

lib/app/modules/addOrUpdateAlarm/views/guardian_angel.dart

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,17 @@ class GuardianAngel extends StatelessWidget {
200200
child: InkWell(
201201
borderRadius: BorderRadius.circular(28),
202202
onTap: () {
203-
controller.isGuardian.value = true;
204-
Get.back();
203+
if (controller.contactTextEditingController.text.isNotEmpty) {
204+
controller.guardian.value = controller.contactTextEditingController.text;
205+
controller.isGuardian.value = true;
206+
Get.back();
207+
} else {
208+
Get.snackbar(
209+
'Error',
210+
'Please enter a phone number',
211+
snackPosition: SnackPosition.BOTTOM,
212+
);
213+
}
205214
},
206215
child: Container(
207216
decoration: BoxDecoration(
@@ -229,4 +238,4 @@ class GuardianAngel extends StatelessWidget {
229238
),
230239
);
231240
}
232-
}
241+
}

0 commit comments

Comments
 (0)