change modes
This commit is contained in:
@ -3,8 +3,12 @@ import 'package:geojson/geojson.dart';
|
||||
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:rogapp/model/destination.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/utils/database_helper.dart';
|
||||
import 'package:rogapp/widgets/bottom_sheet_controller.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
|
||||
@ -12,6 +16,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
BottomSheetNew({ Key? key }) : super(key: key);
|
||||
|
||||
final IndexController indexController = Get.find<IndexController>();
|
||||
final DestinationController destinationController = Get.find<DestinationController>();
|
||||
|
||||
Image getImage(GeoJsonFeature? gf){
|
||||
if(gf!.properties!["photos"] == null || gf.properties!["photos"] == ""){
|
||||
@ -70,6 +75,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
),
|
||||
MaterialButton(
|
||||
onPressed: () {
|
||||
print("----- next is ${indexController.currentFeature[0]} ------");
|
||||
indexController.makeNext(indexController.currentFeature[0]);
|
||||
},
|
||||
color: Colors.blue,
|
||||
@ -125,15 +131,10 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
:
|
||||
Container(width: 0.0, height: 0,),
|
||||
),
|
||||
Obx(() =>
|
||||
indexController.rog_mode.value == 0 ?
|
||||
indexController.currentAction.isNotEmpty ?
|
||||
getDoubleAction(context)
|
||||
:
|
||||
getSingleAction()
|
||||
:
|
||||
getCheckin(context),
|
||||
),
|
||||
SizedBox(height: 20.0,),
|
||||
//Obx(() =>
|
||||
wantToGo(context),
|
||||
//),
|
||||
SizedBox(height: 60.0,)
|
||||
],
|
||||
)
|
||||
@ -141,7 +142,57 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Widget wantToGo(BuildContext context){
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
ElevatedButton(
|
||||
onPressed: (){
|
||||
},
|
||||
|
||||
child: IconButton(
|
||||
icon: Icon(Icons.favorite, color: Colors.white, semanticLabel: "want_to_go".tr,),
|
||||
onPressed: ()
|
||||
{
|
||||
GeoJsonMultiPoint mp = indexController.currentFeature[0].geometry as GeoJsonMultiPoint;
|
||||
LatLng pt = LatLng(mp.geoSerie!.geoPoints[0].latitude, mp.geoSerie!.geoPoints[0].longitude);
|
||||
|
||||
print("--- name---- ${indexController.currentFeature[0].properties!["location_name"]} -----");
|
||||
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,
|
||||
location_id: indexController.currentFeature[0].properties!["location_id"],
|
||||
list_order: 1,
|
||||
photos: indexController.currentFeature[0].properties!["photos"],
|
||||
checkin_radious: indexController.currentFeature[0].properties!["checkin_radious"],
|
||||
auto_checkin: indexController.currentFeature[0].properties!["auto_checkin"] == true ? 1 : 0
|
||||
);
|
||||
destinationController.addDestinations(dest);
|
||||
},
|
||||
)
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget getCheckin(BuildContext context){
|
||||
|
||||
print("------ currentAction ----- ${indexController.currentAction}-----");
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user