chore: bump dart sdk to 3.8 (#20355)

* chore: bump dart sdk to 3.8

* chore: make build

* make pigeon

* chore: format files

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong
2025-07-29 00:34:03 +05:30
committed by GitHub
parent 9b3718120b
commit e52b9d15b5
643 changed files with 32561 additions and 35292 deletions

View File

@@ -48,21 +48,18 @@ class MapUtils {
);
static Map<String, dynamic> _addFeature(MapMarker marker) => {
'type': 'Feature',
'id': marker.assetRemoteId,
'geometry': {
'type': 'Point',
'coordinates': [marker.latLng.longitude, marker.latLng.latitude],
},
};
'type': 'Feature',
'id': marker.assetRemoteId,
'geometry': {
'type': 'Point',
'coordinates': [marker.latLng.longitude, marker.latLng.latitude],
},
};
static Map<String, dynamic> generateGeoJsonForMarkers(
List<MapMarker> markers,
) =>
{
'type': 'FeatureCollection',
'features': markers.map(_addFeature).toList(),
};
static Map<String, dynamic> generateGeoJsonForMarkers(List<MapMarker> markers) => {
'type': 'FeatureCollection',
'features': markers.map(_addFeature).toList(),
};
static Future<(Position?, LocationPermission?)> checkPermAndGetLocation({
required BuildContext context,
@@ -71,10 +68,7 @@ class MapUtils {
try {
bool serviceEnabled = await Geolocator.isLocationServiceEnabled();
if (!serviceEnabled && !silent) {
showDialog(
context: context,
builder: (context) => _LocationServiceDisabledDialog(),
);
showDialog(context: context, builder: (context) => _LocationServiceDisabledDialog());
return (null, LocationPermission.deniedForever);
}
@@ -116,24 +110,24 @@ class MapUtils {
class _LocationServiceDisabledDialog extends ConfirmDialog {
_LocationServiceDisabledDialog()
: super(
title: 'map_location_service_disabled_title'.tr(),
content: 'map_location_service_disabled_content'.tr(),
cancel: 'cancel'.tr(),
ok: 'yes'.tr(),
onOk: () async {
await Geolocator.openLocationSettings();
},
);
: super(
title: 'map_location_service_disabled_title'.tr(),
content: 'map_location_service_disabled_content'.tr(),
cancel: 'cancel'.tr(),
ok: 'yes'.tr(),
onOk: () async {
await Geolocator.openLocationSettings();
},
);
}
class _LocationPermissionDisabledDialog extends ConfirmDialog {
_LocationPermissionDisabledDialog()
: super(
title: 'map_no_location_permission_title'.tr(),
content: 'map_no_location_permission_content'.tr(),
cancel: 'cancel'.tr(),
ok: 'yes'.tr(),
onOk: () {},
);
: super(
title: 'map_no_location_permission_title'.tr(),
content: 'map_no_location_permission_content'.tr(),
cancel: 'cancel'.tr(),
ok: 'yes'.tr(),
onOk: () {},
);
}