fixed distance Mx
This commit is contained in:
@ -547,102 +547,102 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
indexController.rog_mode == 0 ?
|
||||
IconButton(
|
||||
icon: Icon(Icons.pin_drop_sharp, size: 32, color: _selected == true ? Colors.amber : Colors.blue,),
|
||||
onPressed: (){
|
||||
if(_selected){
|
||||
// show remove from destination
|
||||
Get.defaultDialog(
|
||||
title: "本当にこのポイントを通過順から外しますか?",
|
||||
middleText: "場所は目的地リストから削除されます",
|
||||
backgroundColor: Colors.blue.shade300,
|
||||
titleStyle: TextStyle(color: Colors.white),
|
||||
middleTextStyle: TextStyle(color: Colors.white),
|
||||
textConfirm: "はい",
|
||||
textCancel: "いいえ",
|
||||
cancelTextColor: Colors.white,
|
||||
confirmTextColor: Colors.blue,
|
||||
buttonColor: Colors.white,
|
||||
barrierDismissible: false,
|
||||
radius: 10,
|
||||
content: Column(
|
||||
children: [
|
||||
],
|
||||
),
|
||||
onConfirm: (){
|
||||
int _id = indexController.currentFeature[0].properties!["location_id"];
|
||||
Destination? d = destinationController.destinationById(_id);
|
||||
print('--- des id is : ${d} -----');
|
||||
if(d != null) {
|
||||
//print('--- des id is : ${d.location_id} -----');
|
||||
destinationController.deleteDestination(d);
|
||||
Get.back();
|
||||
Get.back();
|
||||
Get.snackbar("追加した", "場所が削除されました");
|
||||
}
|
||||
}
|
||||
);
|
||||
return;
|
||||
}
|
||||
// show add to destination
|
||||
Get.defaultDialog(
|
||||
title: "この場所を登録してもよろしいですか",
|
||||
middleText: "ロケーションがロガニング リストに追加されます",
|
||||
backgroundColor: Colors.blue.shade300,
|
||||
titleStyle: TextStyle(color: Colors.white),
|
||||
middleTextStyle: TextStyle(color: Colors.white),
|
||||
textConfirm: "はい",
|
||||
textCancel: "いいえ",
|
||||
cancelTextColor: Colors.white,
|
||||
confirmTextColor: Colors.blue,
|
||||
buttonColor: Colors.white,
|
||||
barrierDismissible: false,
|
||||
radius: 10,
|
||||
content: Column(
|
||||
children: [
|
||||
],
|
||||
),
|
||||
onConfirm: (){
|
||||
GeoJsonMultiPoint mp = indexController.currentFeature[0].geometry as GeoJsonMultiPoint;
|
||||
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, mp.geoSerie!.geoPoints[0].longitude);
|
||||
// indexController.rog_mode == 0 ?
|
||||
// // IconButton(
|
||||
// // icon: Icon(Icons.pin_drop_sharp, size: 32, color: _selected == true ? Colors.amber : Colors.blue,),
|
||||
// // onPressed: (){
|
||||
// // if(_selected){
|
||||
// // // show remove from destination
|
||||
// // Get.defaultDialog(
|
||||
// // title: "本当にこのポイントを通過順から外しますか?",
|
||||
// // middleText: "場所は目的地リストから削除されます",
|
||||
// // backgroundColor: Colors.blue.shade300,
|
||||
// // titleStyle: TextStyle(color: Colors.white),
|
||||
// // middleTextStyle: TextStyle(color: Colors.white),
|
||||
// // textConfirm: "はい",
|
||||
// // textCancel: "いいえ",
|
||||
// // cancelTextColor: Colors.white,
|
||||
// // confirmTextColor: Colors.blue,
|
||||
// // buttonColor: Colors.white,
|
||||
// // barrierDismissible: false,
|
||||
// // radius: 10,
|
||||
// // content: Column(
|
||||
// // children: [
|
||||
// // ],
|
||||
// // ),
|
||||
// // onConfirm: (){
|
||||
// // int _id = indexController.currentFeature[0].properties!["location_id"];
|
||||
// // Destination? d = destinationController.destinationById(_id);
|
||||
// // print('--- des id is : ${d} -----');
|
||||
// // if(d != null) {
|
||||
// // //print('--- des id is : ${d.location_id} -----');
|
||||
// // destinationController.deleteDestination(d);
|
||||
// // Get.back();
|
||||
// // Get.back();
|
||||
// // Get.snackbar("追加した", "場所が削除されました");
|
||||
// // }
|
||||
// // }
|
||||
// // );
|
||||
// // return;
|
||||
// // }
|
||||
// // // show add to destination
|
||||
// // Get.defaultDialog(
|
||||
// // title: "この場所を登録してもよろしいですか",
|
||||
// // middleText: "ロケーションがロガニング リストに追加されます",
|
||||
// // backgroundColor: Colors.blue.shade300,
|
||||
// // titleStyle: TextStyle(color: Colors.white),
|
||||
// // middleTextStyle: TextStyle(color: Colors.white),
|
||||
// // textConfirm: "はい",
|
||||
// // textCancel: "いいえ",
|
||||
// // cancelTextColor: Colors.white,
|
||||
// // confirmTextColor: Colors.blue,
|
||||
// // buttonColor: Colors.white,
|
||||
// // barrierDismissible: false,
|
||||
// // radius: 10,
|
||||
// // content: Column(
|
||||
// // children: [
|
||||
// // ],
|
||||
// // ),
|
||||
// // onConfirm: (){
|
||||
// // GeoJsonMultiPoint mp = indexController.currentFeature[0].geometry as GeoJsonMultiPoint;
|
||||
// // LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, mp.geoSerie!.geoPoints[0].longitude);
|
||||
|
||||
print("----- want to go sub location is ---- ${indexController.currentFeature[0].properties!["sub_loc_id"]} -----");
|
||||
// // print("----- want to go sub location is ---- ${indexController.currentFeature[0].properties!["sub_loc_id"]} -----");
|
||||
|
||||
Destination dest = Destination(
|
||||
name: indexController.currentFeature[0].properties!["location_name"],
|
||||
address: indexController.currentFeature[0].properties!["address"],
|
||||
phone: indexController.currentFeature[0].properties!["phone"],
|
||||
email: indexController.currentFeature[0].properties!["email"],
|
||||
webcontents: indexController.currentFeature[0].properties!["webcontents"],
|
||||
videos: indexController.currentFeature[0].properties!["videos"],
|
||||
category: indexController.currentFeature[0].properties!["category"],
|
||||
series: 1,
|
||||
lat: pt.latitude,
|
||||
lon: pt.longitude,
|
||||
sub_loc_id: indexController.currentFeature[0].properties!["sub_loc_id"],
|
||||
location_id: indexController.currentFeature[0].properties!["location_id"],
|
||||
list_order: 1,
|
||||
photos: indexController.currentFeature[0].properties!["photos"],
|
||||
checkin_radious: indexController.currentFeature[0].properties!["checkin_radius"],
|
||||
auto_checkin: indexController.currentFeature[0].properties!["auto_checkin"] == true ? 1 : 0,
|
||||
cp: indexController.currentFeature[0].properties!["cp"],
|
||||
checkin_point: indexController.currentFeature[0].properties!["checkin_point"],
|
||||
buy_point: indexController.currentFeature[0].properties!["buy_point"],
|
||||
selected: false,
|
||||
checkedin: false,
|
||||
hidden_location: indexController.currentFeature[0].properties!["hidden_location"] == true ?1 : 0
|
||||
);
|
||||
destinationController.addDestinations(dest);
|
||||
Get.back();
|
||||
Get.back();
|
||||
Get.snackbar("追加した", "場所が追加されました");
|
||||
}
|
||||
);
|
||||
// // Destination dest = Destination(
|
||||
// // name: indexController.currentFeature[0].properties!["location_name"],
|
||||
// // address: indexController.currentFeature[0].properties!["address"],
|
||||
// // phone: indexController.currentFeature[0].properties!["phone"],
|
||||
// // email: indexController.currentFeature[0].properties!["email"],
|
||||
// // webcontents: indexController.currentFeature[0].properties!["webcontents"],
|
||||
// // videos: indexController.currentFeature[0].properties!["videos"],
|
||||
// // category: indexController.currentFeature[0].properties!["category"],
|
||||
// // series: 1,
|
||||
// // lat: pt.latitude,
|
||||
// // lon: pt.longitude,
|
||||
// // sub_loc_id: indexController.currentFeature[0].properties!["sub_loc_id"],
|
||||
// // location_id: indexController.currentFeature[0].properties!["location_id"],
|
||||
// // list_order: 1,
|
||||
// // photos: indexController.currentFeature[0].properties!["photos"],
|
||||
// // checkin_radious: indexController.currentFeature[0].properties!["checkin_radius"],
|
||||
// // auto_checkin: indexController.currentFeature[0].properties!["auto_checkin"] == true ? 1 : 0,
|
||||
// // cp: indexController.currentFeature[0].properties!["cp"],
|
||||
// // checkin_point: indexController.currentFeature[0].properties!["checkin_point"],
|
||||
// // buy_point: indexController.currentFeature[0].properties!["buy_point"],
|
||||
// // selected: false,
|
||||
// // checkedin: false,
|
||||
// // hidden_location: indexController.currentFeature[0].properties!["hidden_location"] == true ?1 : 0
|
||||
// // );
|
||||
// // destinationController.addDestinations(dest);
|
||||
// // Get.back();
|
||||
// // Get.back();
|
||||
// // Get.snackbar("追加した", "場所が追加されました");
|
||||
// // }
|
||||
// // );
|
||||
|
||||
},
|
||||
):
|
||||
Container(),
|
||||
// // },
|
||||
// // ):
|
||||
// // Container(),
|
||||
SizedBox(width: 8.0,) ,
|
||||
Obx((() =>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user