feat : change map marker
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:inspection/presentation/routes/app_routes.dart';
|
import 'package:inspection/presentation/routes/app_routes.dart';
|
||||||
import 'package:rasadyar_core/core.dart';
|
import 'package:rasadyar_core/core.dart';
|
||||||
import 'package:rasadyar_core/data/utils.dart';
|
|
||||||
import 'package:rasadyar_core/presentation/widget/buttons/fab.dart';
|
import 'package:rasadyar_core/presentation/widget/buttons/fab.dart';
|
||||||
|
|
||||||
import 'logic.dart';
|
import 'logic.dart';
|
||||||
@@ -22,10 +21,10 @@ class SupervisionFilterPage extends GetView<InspectorFilterLogic> {
|
|||||||
_buildMap(),
|
_buildMap(),
|
||||||
_buildGpsButton(),
|
_buildGpsButton(),
|
||||||
_buildFilterButton(),
|
_buildFilterButton(),
|
||||||
Obx(() => controller.bottomSheetManager.buildVisibleSheet())],
|
Obx(() => controller.bottomSheetManager.buildVisibleSheet()),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,11 +44,22 @@ class SupervisionFilterPage extends GetView<InspectorFilterLogic> {
|
|||||||
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
),
|
),
|
||||||
ObxValue((markers) {
|
ObxValue((markers) {
|
||||||
return MarkerLayer(markers: markers.map((e)=>markerWidget(marker: e, onTap: () {
|
return MarkerLayer(
|
||||||
controller.selectedLocationBottomSheetController.isVisible.value = true;
|
markers:
|
||||||
|
markers
|
||||||
|
.map(
|
||||||
})).toList());
|
(e) => markerWidget(
|
||||||
|
marker: e,
|
||||||
|
onTap: () {
|
||||||
|
controller
|
||||||
|
.selectedLocationBottomSheetController
|
||||||
|
.isVisible
|
||||||
|
.value = true;
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
.toList(),
|
||||||
|
);
|
||||||
}, controller.markers),
|
}, controller.markers),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
@@ -59,7 +69,7 @@ class SupervisionFilterPage extends GetView<InspectorFilterLogic> {
|
|||||||
Widget _buildGpsButton() {
|
Widget _buildGpsButton() {
|
||||||
return Positioned(
|
return Positioned(
|
||||||
right: 10,
|
right: 10,
|
||||||
bottom:83,
|
bottom: 83,
|
||||||
child: ObxValue((data) {
|
child: ObxValue((data) {
|
||||||
return RFab.small(
|
return RFab.small(
|
||||||
backgroundColor: AppColor.greenNormal,
|
backgroundColor: AppColor.greenNormal,
|
||||||
@@ -97,7 +107,7 @@ Marker markerWidget({required LatLng marker, required VoidCallback onTap}) {
|
|||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 36,
|
width: 36,
|
||||||
height: 36,
|
height: 36,
|
||||||
child: Icon(Icons.location_on, color: Colors.red, size: 30),
|
child: vecWidget(Assets.vecMapMarkerSvg,width: 30,height: 30,),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user