File tree Expand file tree Collapse file tree 5 files changed +10
-9
lines changed
lib/app/modules/addOrUpdateAlarm Expand file tree Collapse file tree 5 files changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -329,7 +329,7 @@ class AddOrUpdateAlarmController extends GetxController {
329329 }
330330
331331 Future <void > getLocation () async {
332- if (await _checkAndRequestPermission ()) {
332+ if (await checkAndRequestPermission ()) {
333333 const timeLimit = Duration (seconds: 10 );
334334 await FlLocation .getLocation (
335335 timeLimit: timeLimit,
@@ -342,7 +342,7 @@ class AddOrUpdateAlarmController extends GetxController {
342342 }
343343 }
344344
345- Future <bool > _checkAndRequestPermission ({bool ? background}) async {
345+ Future <bool > checkAndRequestPermission ({bool ? background}) async {
346346 if (! await FlLocation .isLocationServicesEnabled) {
347347 // Location services are disabled.
348348 return false ;
Original file line number Diff line number Diff line change @@ -98,10 +98,6 @@ class LocationTile extends StatelessWidget {
9898 if (value == 0 ) {
9999 controller.isLocationEnabled.value = false ;
100100 } else if (value == 1 ) {
101- if (controller.isLocationEnabled.value == false ) {
102- await controller.getLocation ();
103- }
104-
105101 Get .defaultDialog (
106102 backgroundColor: themeController.secondaryBackgroundColor.value,
107103 title: 'Set location to automatically cancel alarm!' ,
@@ -152,6 +148,11 @@ class LocationTile extends StatelessWidget {
152148 ],
153149 ),
154150 );
151+
152+ if (controller.isLocationEnabled.value == false ) {
153+ await controller.getLocation ();
154+ controller.mapController.move (controller.selectedPoint.value, 15 );
155+ }
155156 }
156157 });
157158 },
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class WeatherTile extends StatelessWidget {
2626 child: ListTile (
2727 onTap: () async {
2828 Utils .hapticFeedback ();
29- await controller.getLocation ();
29+ await controller.checkAndRequestPermission ();
3030 Get .defaultDialog (
3131 titlePadding: const EdgeInsets .symmetric (vertical: 20 ),
3232 backgroundColor: themeController.secondaryBackgroundColor.value,
Original file line number Diff line number Diff line change 182182 isa = PBXProject;
183183 attributes = {
184184 LastSwiftUpdateCheck = 0920;
185- LastUpgradeCheck = 1300 ;
185+ LastUpgradeCheck = 1510 ;
186186 ORGANIZATIONNAME = "";
187187 TargetAttributes = {
188188 33CC10EC2044A3C60003C045 = {
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<Scheme
3- LastUpgradeVersion = " 1300 "
3+ LastUpgradeVersion = " 1510 "
44 version = " 1.3" >
55 <BuildAction
66 parallelizeBuildables = " YES"
You can’t perform that action at this time.
0 commit comments