update goal

This commit is contained in:
Mohamed Nouffer
2023-01-26 10:57:44 +05:30
parent b5d2de44f9
commit dcf7d4363d
2 changed files with 6 additions and 5 deletions

View File

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

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.5+5 version: 1.0.6+6
environment: environment:
sdk: ">=2.16.0 <3.0.0" sdk: ">=2.16.0 <3.0.0"