update
This commit is contained in:
@ -239,48 +239,98 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
Obx(() =>
|
Obx(() =>
|
||||||
indexController.currentFeature[0].properties!["address"] != null && (indexController.currentFeature[0].properties!["address"] as String).isNotEmpty ?
|
Padding(
|
||||||
getDetails(context, "address".tr, indexController.currentFeature[0].properties!["address"] ?? '')
|
padding: const EdgeInsets.all(8.0),
|
||||||
:
|
child: Column(
|
||||||
Container(width: 0.0, height: 0,),
|
children: [
|
||||||
),
|
Row(
|
||||||
Obx(() =>
|
children: [
|
||||||
indexController.currentFeature[0].properties!["phone"] != null && (indexController.currentFeature[0].properties!["phone"] as String).isNotEmpty ?
|
Expanded(
|
||||||
getDetails(context, "telephone".tr, indexController.currentFeature[0].properties!["phone"] ?? '')
|
child: Row(
|
||||||
:
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
Container(width: 0.0, height: 0,),
|
children: [
|
||||||
),
|
FutureBuilder<Widget>(
|
||||||
Obx(() =>
|
future: wantToGo(context),
|
||||||
indexController.currentFeature[0].properties!["email"] != null && (indexController.currentFeature[0].properties!["email"] as String).isNotEmpty ?
|
builder: (context, snapshot) {
|
||||||
getDetails(context, "email".tr, indexController.currentFeature[0].properties!["email"] ?? '')
|
return Container(
|
||||||
:
|
child: snapshot.data,
|
||||||
Container(width: 0.0, height: 0,),
|
);
|
||||||
),
|
},
|
||||||
Obx(() =>
|
),
|
||||||
indexController.currentFeature[0].properties!["webcontents"] != null && (indexController.currentFeature[0].properties!["webcontents"] as String).isNotEmpty ?
|
indexController.currentFeature[0].properties!["location_name"] != null && (indexController.currentFeature[0].properties!["address"] as String).isNotEmpty ?
|
||||||
getDetails(context, "web".tr, indexController.currentFeature[0].properties!["webcontents"] ?? '', isurl: true)
|
Flexible(child: Text(indexController.currentFeature[0].properties!["location_name"]))
|
||||||
:
|
:
|
||||||
Container(width: 0.0, height: 0,),
|
Container(width: 0.0, height: 0,),
|
||||||
),
|
],
|
||||||
Obx(() =>
|
),
|
||||||
indexController.currentFeature[0].properties!["videos"] !=null && (indexController.currentFeature[0].properties!["videos"] as String).isNotEmpty ?
|
),
|
||||||
getDetails(context, "video".tr, indexController.currentFeature[0].properties!["videos"] ?? '', isurl: true)
|
Expanded(
|
||||||
:
|
child: Row(
|
||||||
Container(width: 0.0, height: 0,),
|
mainAxisAlignment: MainAxisAlignment.start,
|
||||||
),
|
children: [
|
||||||
SizedBox(height: 20.0,),
|
Icon(Icons.thumb_up_alt_sharp),
|
||||||
Obx(() =>
|
Text("Like"),
|
||||||
//wantToGo(context),
|
],
|
||||||
|
),
|
||||||
FutureBuilder<Widget>(
|
),
|
||||||
future: wantToGo(context),
|
],
|
||||||
builder: (context, snapshot) {
|
),
|
||||||
return Container(
|
SizedBox(height: 8.0,),
|
||||||
child: snapshot.data,
|
Padding(
|
||||||
);
|
padding: const EdgeInsets.all(8.0),
|
||||||
},
|
child: Row(
|
||||||
),
|
children: [
|
||||||
|
Icon(Icons.roundabout_left),
|
||||||
|
SizedBox(width: 8.0,),
|
||||||
|
indexController.currentFeature[0].properties!["address"] != null && (indexController.currentFeature[0].properties!["address"] as String).isNotEmpty ?
|
||||||
|
getDetails(context, "address".tr, indexController.currentFeature[0].properties!["address"] ?? '')
|
||||||
|
:
|
||||||
|
Container(width: 0.0, height: 0,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.phone),
|
||||||
|
SizedBox(width: 8.0,),
|
||||||
|
indexController.currentFeature[0].properties!["phone"] != null && (indexController.currentFeature[0].properties!["phone"] as String).isNotEmpty ?
|
||||||
|
getDetails(context, "telephone".tr, indexController.currentFeature[0].properties!["phone"] ?? '')
|
||||||
|
:
|
||||||
|
Container(width: 0.0, height: 0,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.email),
|
||||||
|
SizedBox(width: 8.0,),
|
||||||
|
indexController.currentFeature[0].properties!["email"] != null && (indexController.currentFeature[0].properties!["email"] as String).isNotEmpty ?
|
||||||
|
getDetails(context, "email".tr, indexController.currentFeature[0].properties!["email"] ?? '')
|
||||||
|
:
|
||||||
|
Container(width: 0.0, height: 0,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Icon(Icons.language),
|
||||||
|
SizedBox(width: 8.0,),
|
||||||
|
indexController.currentFeature[0].properties!["webcontents"] != null && (indexController.currentFeature[0].properties!["webcontents"] as String).isNotEmpty ?
|
||||||
|
getDetails(context, "web".tr, indexController.currentFeature[0].properties!["webcontents"] ?? '', isurl: true)
|
||||||
|
:
|
||||||
|
Container(width: 0.0, height: 0,),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
),
|
),
|
||||||
SizedBox(height: 60.0,)
|
SizedBox(height: 60.0,)
|
||||||
],
|
],
|
||||||
@ -292,9 +342,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
Future<Widget> wantToGo(BuildContext context)async {
|
Future<Widget> wantToGo(BuildContext context)async {
|
||||||
|
|
||||||
DatabaseHelper db = DatabaseHelper.instance;
|
DatabaseHelper db = DatabaseHelper.instance;
|
||||||
//bool isAdded = await db.isAlreadyAvailable(indexController.currentFeature[0].properties!["location_id"]);
|
|
||||||
return
|
return
|
||||||
// isAdded == true ? Container(child: Text("すでに追加されています"),) :
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
@ -302,8 +350,9 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
indexController.rog_mode == 0 ?
|
indexController.rog_mode == 0 ?
|
||||||
ElevatedButton(
|
IconButton(
|
||||||
child: Text("want_to_go".tr),
|
icon: Icon(Icons.pin_drop_sharp, size: 32,),
|
||||||
|
|
||||||
onPressed: (){
|
onPressed: (){
|
||||||
GeoJsonMultiPoint mp = indexController.currentFeature[0].geometry as GeoJsonMultiPoint;
|
GeoJsonMultiPoint mp = indexController.currentFeature[0].geometry as GeoJsonMultiPoint;
|
||||||
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, mp.geoSerie!.geoPoints[0].longitude);
|
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, mp.geoSerie!.geoPoints[0].longitude);
|
||||||
@ -331,7 +380,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
},
|
},
|
||||||
):
|
):
|
||||||
Container(),
|
Container(),
|
||||||
SizedBox(width: 20.0,) ,
|
SizedBox(width: 8.0,) ,
|
||||||
Obx((() =>
|
Obx((() =>
|
||||||
|
|
||||||
indexController.rog_mode == 1 ?
|
indexController.rog_mode == 1 ?
|
||||||
@ -426,121 +475,6 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget getSingleAction(){
|
|
||||||
return Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
TextButton(
|
|
||||||
onPressed: (){
|
|
||||||
Get.toNamed(AppPages.LOGIN);
|
|
||||||
},
|
|
||||||
child: Text("その他のオプションについてはログインしてください"))
|
|
||||||
],
|
|
||||||
)
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
Widget getDoubleAction(BuildContext context){
|
|
||||||
return Container(
|
|
||||||
color: Colors.black12,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical:8.0),
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
Flexible(
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
indexController.currentAction[0][0]["wanttogo"] == false ?
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: (){
|
|
||||||
if(indexController.currentAction.isNotEmpty){
|
|
||||||
print(indexController.currentAction[0]);
|
|
||||||
indexController.currentAction[0][0]["wanttogo"] = true;
|
|
||||||
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
|
|
||||||
indexController.currentAction.clear();
|
|
||||||
print("---temp---${temp}");
|
|
||||||
indexController.currentAction.add([temp]);
|
|
||||||
}
|
|
||||||
indexController.makeAction(context);
|
|
||||||
},
|
|
||||||
child: Text("want_to_go".tr)
|
|
||||||
) :
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: (){
|
|
||||||
if(indexController.currentAction.isNotEmpty){
|
|
||||||
print(indexController.currentAction[0]);
|
|
||||||
indexController.currentAction[0][0]["wanttogo"] = false;
|
|
||||||
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
|
|
||||||
indexController.currentAction.clear();
|
|
||||||
print("---temp---${temp}");
|
|
||||||
indexController.currentAction.add([temp]);
|
|
||||||
}
|
|
||||||
indexController.makeAction(context);
|
|
||||||
},
|
|
||||||
|
|
||||||
child: IconButton(
|
|
||||||
icon: Icon(Icons.favorite, color: Colors.red, semanticLabel: "want_to_go".tr,), onPressed: () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
)
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Flexible(
|
|
||||||
child: Row(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
children: [
|
|
||||||
indexController.currentAction[0][0]["like"] == false ?
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: (){
|
|
||||||
if(indexController.currentAction.isNotEmpty){
|
|
||||||
print(indexController.currentAction[0]);
|
|
||||||
indexController.currentAction[0][0]["like"] = true;
|
|
||||||
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
|
|
||||||
indexController.currentAction.clear();
|
|
||||||
print("---temp---${temp}");
|
|
||||||
indexController.currentAction.add([temp]);
|
|
||||||
}
|
|
||||||
indexController.makeAction(context);
|
|
||||||
},
|
|
||||||
child: Text("like".tr)
|
|
||||||
) :
|
|
||||||
ElevatedButton(
|
|
||||||
onPressed: (){
|
|
||||||
if(indexController.currentAction.isNotEmpty){
|
|
||||||
print(indexController.currentAction[0]);
|
|
||||||
indexController.currentAction[0][0]["like"] = false;
|
|
||||||
Map<String,dynamic> temp = Map<String,dynamic>.from(indexController.currentAction[0][0]);
|
|
||||||
indexController.currentAction.clear();
|
|
||||||
print("---temp---${temp}");
|
|
||||||
indexController.currentAction.add([temp]);
|
|
||||||
}
|
|
||||||
indexController.makeAction(context);
|
|
||||||
},
|
|
||||||
|
|
||||||
child: IconButton(
|
|
||||||
icon: Icon(Icons.favorite, color: Colors.red, semanticLabel: "like".tr,), onPressed: () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
)
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Widget getDetails(BuildContext context, String label, String text, {bool isurl=false}){
|
Widget getDetails(BuildContext context, String label, String text, {bool isurl=false}){
|
||||||
|
|||||||
Reference in New Issue
Block a user