fix : change map to openStreet

This commit is contained in:
2025-04-26 09:45:28 +03:30
parent 12be91d7f8
commit 6e6d2b22f6
7 changed files with 106 additions and 198 deletions

View File

@@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:inspection/presentation/routes/app_routes.dart';
import 'package:latlong2/latlong.dart';
import 'package:rasadyar_core/core.dart';
import 'package:rasadyar_core/presentation/widget/buttons/fab.dart';
import 'package:inspection/presentation/routes/app_routes.dart';
import 'logic.dart';
@@ -46,15 +46,13 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
),
children: [
TileLayer(
urlTemplate:
"https://map.ir/shiveh/xyz/1.0.0/Shiveh:Shiveh@EPSG:3857@png/{z}/{x}/{y}.png"
"?x-api-key=$token",
urlTemplate: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
),
ObxValue((markers) {
return MarkerLayer(
markers:
markers.map((marker) => markerWidget(marker)).toList(),
markers.map((marker) => markerWidget(marker)).toList(),
);
}, controller.markers),
],
@@ -71,9 +69,9 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
onPressed: () {
controller.isLoading.value = true;
controller.determineCurrentPosition().then(
(value) =>
controller.isLoading.value =
!controller.isLoading.value,
(value) =>
controller.isLoading.value =
!controller.isLoading.value,
);
},
);
@@ -86,21 +84,22 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
backgroundColor: AppColor.blueNormal,
icon: vecWidget(Assets.vecFilterSvg, width: 24, height: 24),
onPressed: () {
controller.sheetController.value.addBottomSheet(child: filterWidget(),
initHeight: 400,
maxHeight: 470,
minHeight: 350);
controller.sheetController.value.addBottomSheet(
child: filterWidget(),
initHeight: 400,
maxHeight: 470,
minHeight: 350,
);
},
),
),
Obx(
() =>
Stack(
children:
() => Stack(
children:
controller.sheetController.value.bottomSheets
.map((sheet) => sheet)
.toList(),
),
),
),
],
),
@@ -566,28 +565,27 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
...List.generate(
5,
(index) =>
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
(index) => Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
'فروش رفته',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'0 کیلوگرم',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
children: [
Text(
'فروش رفته',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
Text(
'0 کیلوگرم',
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
],
),
),
],
),
@@ -611,21 +609,19 @@ class SupervisionFilterPage extends GetView<SupervisionFilterLogic> {
color: isSelected ? AppColor.blueNormal : AppColor.whiteGreyNormal,
borderRadius: BorderRadius.circular(8),
border:
isSelected
? Border.fromBorderSide(BorderSide.none)
: Border.all(width: 0.25, color: const Color(0xFFB0B0B0)),
isSelected
? Border.fromBorderSide(BorderSide.none)
: Border.all(width: 0.25, color: const Color(0xFFB0B0B0)),
),
child: Text(
title,
textAlign: TextAlign.center,
style:
isSelected
? AppFonts.yekan10.copyWith(color: AppColor.whiteLight)
: AppFonts.yekan10,
isSelected
? AppFonts.yekan10.copyWith(color: AppColor.whiteLight)
: AppFonts.yekan10,
),
),
);
}
}