fixed route
This commit is contained in:
@ -362,19 +362,17 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.colorScheme
|
.colorScheme
|
||||||
.onPrimaryContainer),
|
.onPrimaryContainer),
|
||||||
onPressed: destinationController.distanceToStart() >
|
onPressed: () async {
|
||||||
500
|
|
||||||
? () async {
|
|
||||||
// print(
|
// print(
|
||||||
// "dist to start ${destinationController.distanceToStart()}");
|
// "dist to start ${destinationController.distanceToStart()}");
|
||||||
Get.back();
|
Get.back();
|
||||||
//print("---- go to ----");
|
//print("---- go to ----");
|
||||||
GeoJSONMultiPoint mp = indexController
|
// GeoJSONMultiPoint mp = indexController
|
||||||
.currentFeature[0] as GeoJSONMultiPoint;
|
// .currentFeature[0] as GeoJSONMultiPoint;
|
||||||
Position position =
|
Position position =
|
||||||
await Geolocator.getCurrentPosition(
|
await Geolocator.getCurrentPosition(
|
||||||
desiredAccuracy: LocationAccuracy
|
desiredAccuracy:
|
||||||
.bestForNavigation,
|
LocationAccuracy.bestForNavigation,
|
||||||
forceAndroidLocationManager: true);
|
forceAndroidLocationManager: true);
|
||||||
//print("------- position -------- $position");
|
//print("------- position -------- $position");
|
||||||
Destination ds = Destination(
|
Destination ds = Destination(
|
||||||
@ -382,14 +380,11 @@ class BottomSheetNew extends GetView<BottomSheetController> {
|
|||||||
lon: position.longitude);
|
lon: position.longitude);
|
||||||
|
|
||||||
Destination tp = Destination(
|
Destination tp = Destination(
|
||||||
lat: mp.coordinates[0][1],
|
lat: destination.lat, lon: destination.lon);
|
||||||
lon: mp.coordinates[0][0]);
|
|
||||||
|
|
||||||
destinationController
|
destinationController
|
||||||
.destinationMatrixFromCurrentPoint(
|
.destinationMatrixFromCurrentPoint([ds, tp]);
|
||||||
[ds, tp]);
|
},
|
||||||
}
|
|
||||||
: null,
|
|
||||||
//go here
|
//go here
|
||||||
child: Text(
|
child: Text(
|
||||||
"ここへ行く",
|
"ここへ行く",
|
||||||
|
|||||||
Reference in New Issue
Block a user