optimized

This commit is contained in:
Mohamed Nouffer
2023-10-06 16:25:21 +05:30
parent 7fdb6c05ee
commit 0e2a8f89f3
101 changed files with 50948 additions and 4137 deletions

View File

@ -25,7 +25,7 @@ class DestinationMapPage extends StatelessWidget {
final PopupController _popupLayerController = PopupController();
List<LatLng>? getPoints() {
print("##### --- route point ${indexController.routePoints.length}");
//print("##### --- route point ${indexController.routePoints.length}");
List<LatLng> pts = [];
for (PointLatLng p in indexController.routePoints) {
LatLng l = LatLng(p.latitude, p.longitude);
@ -39,14 +39,14 @@ class DestinationMapPage extends StatelessWidget {
int index = -1;
for (int i = 0; i < destinationController.destinations.length; i++) {
Destination d = destinationController.destinations[i];
print("^^^^ $d ^^^^");
//print("^^^^ $d ^^^^");
Marker m = Marker(
point: LatLng(d.lat!, d.lon!),
anchorPos: AnchorPos.align(AnchorAlign.center),
builder: (cts) {
return InkWell(
onTap: () {
print("-- Destination is --- ${d.name} ------");
//print("-- Destination is --- ${d.name} ------");
if (indexController.currentDestinationFeature.isNotEmpty) {
indexController.currentDestinationFeature.clear();
}
@ -58,9 +58,11 @@ class DestinationMapPage extends StatelessWidget {
isScrollControlled: true,
constraints: BoxConstraints.loose(
Size(Get.width, Get.height * 0.75)),
builder: ((context) => BottomSheetNew(destination: d,))).whenComplete(() {
print("---- set skip gps to false -----");
destinationController.skip_gps = false;
builder: ((context) => BottomSheetNew(
destination: d,
))).whenComplete(() {
//print("---- set skip gps to false -----");
destinationController.skipGps = false;
});
},
child: Row(
@ -118,18 +120,18 @@ class DestinationMapPage extends StatelessWidget {
Padding(
padding: const EdgeInsets.only(top: 0.0),
//child: TravelMap(),
child: TravelMap(),
child: travelMap(),
),
],
)));
}
FlutterMap TravelMap() {
FlutterMap travelMap() {
return FlutterMap(
mapController: indexController.rogMapController,
options: MapOptions(
onMapReady: () {
indexController.is_rog_mapcontroller_loaded.value = true;
indexController.isRogMapcontrollerLoaded.value = true;
subscription = indexController.rogMapController.mapEventStream
.listen((MapEvent mapEvent) {
if (mapEvent is MapEventMoveStart) {}