update
This commit is contained in:
@ -1,7 +1,10 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:geojson/geojson.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:rogapp/index/index_controller.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
import 'package:rogapp/routes/app_pages.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
class BottomSheetWidget extends StatelessWidget {
|
||||
@ -22,20 +25,6 @@ class BottomSheetWidget extends StatelessWidget {
|
||||
if (!await launch(url)) throw 'Could not launch $url';
|
||||
}
|
||||
|
||||
// Widget getAttrib(String name){
|
||||
// print("calling ...");
|
||||
// if(homeController.currentFeature[0].properties!["phone"] == null || homeController.currentFeature[0].properties!["phone"] == ""){
|
||||
// return Container(height: 0, width: 0,);
|
||||
// }
|
||||
// else {
|
||||
// return Obx(() =>
|
||||
// Text(homeController.currentFeature[0].properties!["phone"] ?? '',
|
||||
// style: TextStyle(color: Colors.blue,),
|
||||
// overflow: TextOverflow.ellipsis,)
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SingleChildScrollView(
|
||||
@ -213,22 +202,125 @@ class BottomSheetWidget extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
SizedBox(height: 20.0,),
|
||||
Obx(() =>
|
||||
indexController.currentAction.isNotEmpty ?
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
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: (){},
|
||||
child: Text("schedule_point".tr)
|
||||
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: () {
|
||||
|
||||
},
|
||||
|
||||
)
|
||||
),
|
||||
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: (){},
|
||||
child: Text("schedule_point".tr)
|
||||
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: () {
|
||||
|
||||
},
|
||||
|
||||
)
|
||||
),
|
||||
indexController.currentAction[0][0]["checkin"] == false ?
|
||||
ElevatedButton(
|
||||
onPressed: (){
|
||||
if(indexController.currentAction.isNotEmpty){
|
||||
print(indexController.currentAction[0]);
|
||||
indexController.currentAction[0][0]["checkin"] = 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("checkin".tr)
|
||||
) :
|
||||
ElevatedButton(
|
||||
onPressed: (){},
|
||||
child: Text("schedule_point".tr)
|
||||
onPressed: (){
|
||||
if(indexController.currentAction.isNotEmpty){
|
||||
print(indexController.currentAction[0]);
|
||||
indexController.currentAction[0][0]["checkin"] = 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: Icon(
|
||||
Icons.favorite, color: Colors.red)
|
||||
|
||||
,
|
||||
)
|
||||
],
|
||||
): Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
TextButton(
|
||||
onPressed: (){
|
||||
Get.toNamed(AppPages.LOGIN);
|
||||
},
|
||||
child: Flexible(child: Text("その他のオプションについてはログインしてください")))
|
||||
],
|
||||
),
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user