image chekin
This commit is contained in:
@ -5,10 +5,13 @@ import 'package:get/get.dart';
|
||||
import 'package:get/get_state_manager/get_state_manager.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:modal_bottom_sheet/modal_bottom_sheet.dart';
|
||||
import 'package:rogapp/model/destination.dart';
|
||||
import 'package:rogapp/pages/camera/camera_page.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';
|
||||
import 'package:rogapp/utils/const.dart';
|
||||
import 'package:rogapp/utils/database_helper.dart';
|
||||
import 'package:rogapp/utils/text_util.dart';
|
||||
@ -173,21 +176,47 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
ElevatedButton(
|
||||
onPressed: (){
|
||||
if(indexController.currentDestinationFeature[0].checkedin == null || indexController.currentDestinationFeature[0].checkedin == false){
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], true);
|
||||
if(indexController.currentDestinationFeature[0].cp != -1){
|
||||
destinationController.rogaining_counted.value =true;
|
||||
if(indexController.currentDestinationFeature[0].hidden_location == 0){
|
||||
destinationController.skip_gps = false;
|
||||
destinationController.is_photo_shoot.value = true;
|
||||
Get.back();
|
||||
|
||||
// showMaterialModalBottomSheet(
|
||||
// expand: true,
|
||||
// context: Get.context!,
|
||||
// backgroundColor: Colors.transparent,
|
||||
// builder: (context) => BottomSheetNew()
|
||||
// ).whenComplete(() {
|
||||
// });
|
||||
|
||||
// showModalBottomSheet(context: Get.context!, isScrollControlled: true,
|
||||
// //builder:((context) => CameraPage())
|
||||
// builder:((context) => Container(child: Text("model"),))
|
||||
// ).whenComplete((){
|
||||
// // destinationController.makeCheckin(indexController.currentDestinationFeature[0], true);
|
||||
// // if(indexController.currentDestinationFeature[0].cp != -1){
|
||||
// // destinationController.rogaining_counted.value =true;
|
||||
// // }
|
||||
// });
|
||||
}
|
||||
else{
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], true, "");
|
||||
if(indexController.currentDestinationFeature[0].cp != -1){
|
||||
destinationController.rogaining_counted.value =true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], false);
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], false, "");
|
||||
}
|
||||
Get.back();
|
||||
//Get.back();
|
||||
},
|
||||
child: Text(
|
||||
indexController.currentDestinationFeature[0].checkedin == null || indexController.currentDestinationFeature[0].checkedin == false ?
|
||||
"Chekin"
|
||||
"チェックイン"
|
||||
:
|
||||
"Checkput"
|
||||
"チェックアウト"
|
||||
)
|
||||
),
|
||||
],
|
||||
@ -201,13 +230,13 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
onPressed: (){
|
||||
destinationController.is_in_rog.value = true;
|
||||
destinationController.addToRogaining(destinationController.current_lat, destinationController.current_lon, indexController.currentDestinationFeature[0].location_id!);
|
||||
Get.back();
|
||||
ExternalService().StartRogaining().then((value) => Get.back());
|
||||
},
|
||||
child: Text(
|
||||
indexController.currentDestinationFeature[0].checkedin != null || indexController.currentDestinationFeature[0].checkedin == true ?
|
||||
"Start Rogaining"
|
||||
"ロゲイニングを開始"
|
||||
:
|
||||
"Wrong destination ..."
|
||||
"間違った目的地..."
|
||||
)
|
||||
)
|
||||
:
|
||||
@ -223,9 +252,9 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
},
|
||||
child: Text(
|
||||
indexController.currentDestinationFeature[0].checkedin != null || indexController.currentDestinationFeature[0].checkedin == true ?
|
||||
"Finish Rogaining"
|
||||
"ロゲイニングを終える"
|
||||
:
|
||||
"Wrong destination ..."
|
||||
"間違った目的地 ..."
|
||||
)
|
||||
)
|
||||
:
|
||||
@ -350,21 +379,21 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
ElevatedButton(
|
||||
onPressed: (){
|
||||
if(indexController.currentDestinationFeature[0].checkedin == null || indexController.currentDestinationFeature[0].checkedin == false){
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], true);
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], true, "");
|
||||
if(indexController.currentDestinationFeature[0].cp != -1){
|
||||
destinationController.rogaining_counted.value =true;
|
||||
}
|
||||
}
|
||||
else{
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], false);
|
||||
destinationController.makeCheckin(indexController.currentDestinationFeature[0], false, "");
|
||||
}
|
||||
Get.back();
|
||||
},
|
||||
child: Text(
|
||||
indexController.currentDestinationFeature[0].checkedin == null || indexController.currentDestinationFeature[0].checkedin == false ?
|
||||
"Chekin"
|
||||
"チェックイン"
|
||||
:
|
||||
"Checkput"
|
||||
"チェックアウト"
|
||||
)
|
||||
),
|
||||
],
|
||||
@ -604,13 +633,13 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
//print("------ curent destination is ${dest!.checkedIn}-------");
|
||||
if(dest != null){
|
||||
//print("------ curent destination is ${dest!.checkedin}-------::::::::::");
|
||||
destinationController.makeCheckin(dest, !dest.checkedin!);
|
||||
destinationController.makeCheckin(dest, !dest.checkedin!, "");
|
||||
}
|
||||
},
|
||||
child: indexController.currentDestinationFeature[0].checkedin == false ?
|
||||
Text("Check in")
|
||||
Text("チェックイン")
|
||||
:
|
||||
Text("Check out")
|
||||
Text("チェックアウト")
|
||||
):
|
||||
Container()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user