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