added reset

This commit is contained in:
Mohamed Nouffer
2023-01-26 20:09:33 +05:30
parent ad61ab2b16
commit 03b586651d
3 changed files with 32 additions and 14 deletions

View File

@ -3,7 +3,6 @@ import 'package:get/get.dart';
import 'package:intl/intl.dart';
import 'package:rogapp/pages/destination/destination_controller.dart';
import 'package:rogapp/pages/index/index_controller.dart';
import 'package:rogapp/routes/app_pages.dart';
import 'package:rogapp/services/external_service.dart';
class CameraPage extends StatelessWidget {
@ -52,7 +51,7 @@ class CameraPage extends StatelessWidget {
ExternalService().makeGoal(user_id, _token, _team, destinationController.photos[0].path, formattedDate, _event_code).then((value){
print("---called ext api ${value['status']} ------");
if(value['status'] == 'OK'){
Get.off(AppPages.TRAVEL);
Get.back();
destinationController.skip_gps = false;
Get.snackbar("目標が保存されました", "目標が正常に追加されました");
destinationController.resetRogaining();
@ -89,7 +88,7 @@ class CameraPage extends StatelessWidget {
onPressed: (){
destinationController.makeCheckin(indexController.currentDestinationFeature[0], true, destinationController.photos[0].path);
Get.off(AppPages.TRAVEL);
Get.back();
destinationController.rogaining_counted.value = true;
destinationController.skip_gps = false;
destinationController.is_photo_shoot.value = false;
@ -188,7 +187,7 @@ class StartRogaining extends StatelessWidget {
SizedBox(height: 40.0,),
ElevatedButton(
onPressed: (){
Get.off(AppPages.TRAVEL);
Get.back();
destinationController.skip_gps = false;
},
child: Text("Back"),
@ -221,7 +220,7 @@ class NotAtGoal extends StatelessWidget {
SizedBox(height: 40.0,),
ElevatedButton(
onPressed: (){
Get.off(AppPages.TRAVEL);
Get.back();
destinationController.skip_gps = false;
},
child: Text("Back"),