fixed state
This commit is contained in:
@ -3,6 +3,8 @@ import 'package:geojson/geojson.dart';
|
||||
import 'package:geolocator/geolocator.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:image_picker/image_picker.dart';
|
||||
import 'package:latlong2/latlong.dart';
|
||||
import 'package:rogapp/main.dart';
|
||||
import 'package:rogapp/model/destination.dart';
|
||||
import 'package:rogapp/pages/destination/destination_controller.dart';
|
||||
import 'package:rogapp/pages/index/index_controller.dart';
|
||||
@ -242,6 +244,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
destinationController.current_lon,
|
||||
indexController
|
||||
.currentDestinationFeature[0].location_id!);
|
||||
saveGameState();
|
||||
ExternalService()
|
||||
.StartRogaining()
|
||||
.then((value) => Get.back());
|
||||
@ -368,6 +371,13 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
|
||||
// show add location details
|
||||
SingleChildScrollView detailsSheet(BuildContext context) {
|
||||
|
||||
Destination _cdest = destinationController.festuretoDestination(
|
||||
indexController.currentFeature[0]);
|
||||
var distance = const Distance();
|
||||
double _distance_to_dest = distance.as(LengthUnit.Meter, LatLng(destinationController.current_lat, destinationController.current_lon), LatLng(_cdest.lat!, _cdest.lon!));
|
||||
|
||||
|
||||
return SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
@ -445,6 +455,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
indexController
|
||||
.currentDestinationFeature[0]
|
||||
.location_id!);
|
||||
saveGameState();
|
||||
ExternalService()
|
||||
.StartRogaining()
|
||||
.then((value) => Get.back());
|
||||
@ -535,6 +546,10 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
|
||||
|
||||
// forced start / checkin
|
||||
_distance_to_dest <= 100 ?
|
||||
ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor:
|
||||
@ -550,6 +565,7 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
destinationController.current_lat,
|
||||
destinationController.current_lon,
|
||||
dd.location_id!);
|
||||
saveGameState();
|
||||
ExternalService()
|
||||
.StartRogaining()
|
||||
.then((value) => Get.back());
|
||||
@ -569,7 +585,10 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
||||
style: TextStyle(
|
||||
color: Theme.of(context)
|
||||
.colorScheme
|
||||
.onSecondary))),
|
||||
.onSecondary))):
|
||||
|
||||
Container()
|
||||
,
|
||||
],
|
||||
),
|
||||
Row(
|
||||
|
||||
Reference in New Issue
Block a user