From b80d06fa788a29eb16002b8db77cc2e453a116c9 Mon Sep 17 00:00:00 2001 From: zhengzeqin Date: Sat, 20 Jul 2024 14:31:49 +0800 Subject: [PATCH 1/2] update: migrate from ui.hash* to Object.hash* Signed-off-by: zhengzeqin --- CHANGELOG.md | 4 ++++ lib/src/annotation.dart | 2 +- lib/src/annotation_updates.dart | 2 +- lib/src/camera.dart | 2 +- lib/src/circle_updates.dart | 2 +- lib/src/location.dart | 4 ++-- lib/src/polygon_updates.dart | 2 +- lib/src/polyline_updates.dart | 2 +- lib/src/snapshot_options.dart | 2 +- lib/src/ui.dart | 2 +- pubspec.yaml | 2 +- 11 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb3e9a3..ed5e3c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.4.0 + +* Migrates from `ui.hash*` to `Object.hash*` + ## 1.3.0 * Animate marker position changes instead of removing and re-adding diff --git a/lib/src/annotation.dart b/lib/src/annotation.dart index 17d61cf..71b6b12 100644 --- a/lib/src/annotation.dart +++ b/lib/src/annotation.dart @@ -89,7 +89,7 @@ class InfoWindow { } @override - int get hashCode => hashValues(title.hashCode, snippet, anchor); + int get hashCode => Object.hash(title.hashCode, snippet, anchor); @override String toString() { diff --git a/lib/src/annotation_updates.dart b/lib/src/annotation_updates.dart index be0f13a..55b62e7 100644 --- a/lib/src/annotation_updates.dart +++ b/lib/src/annotation_updates.dart @@ -87,7 +87,7 @@ class _AnnotationUpdates { @override int get hashCode => - hashValues(annotationsToAdd, annotationIdsToRemove, annotationsToChange); + Object.hash(annotationsToAdd, annotationIdsToRemove, annotationsToChange); @override String toString() { diff --git a/lib/src/camera.dart b/lib/src/camera.dart index 09bc24f..fb842af 100644 --- a/lib/src/camera.dart +++ b/lib/src/camera.dart @@ -73,7 +73,7 @@ class CameraPosition { } @override - int get hashCode => hashValues(heading, target, pitch, zoom); + int get hashCode => Object.hash(heading, target, pitch, zoom); @override String toString() => diff --git a/lib/src/circle_updates.dart b/lib/src/circle_updates.dart index a7282cd..2788e48 100644 --- a/lib/src/circle_updates.dart +++ b/lib/src/circle_updates.dart @@ -87,7 +87,7 @@ class _CircleUpdates { @override int get hashCode => - hashValues(circlesToAdd, circleIdsToRemove, circlesToChange); + Object.hash(circlesToAdd, circleIdsToRemove, circlesToChange); @override String toString() { diff --git a/lib/src/location.dart b/lib/src/location.dart index f8360d0..b004f5c 100644 --- a/lib/src/location.dart +++ b/lib/src/location.dart @@ -44,7 +44,7 @@ class LatLng { } @override - int get hashCode => hashValues(latitude, longitude); + int get hashCode => Object.hash(latitude, longitude); } /// A latitude/longitude aligned rectangle. @@ -116,5 +116,5 @@ class LatLngBounds { } @override - int get hashCode => hashValues(southwest, northeast); + int get hashCode => Object.hash(southwest, northeast); } diff --git a/lib/src/polygon_updates.dart b/lib/src/polygon_updates.dart index 76eea3f..9f81494 100644 --- a/lib/src/polygon_updates.dart +++ b/lib/src/polygon_updates.dart @@ -87,7 +87,7 @@ class _PolygonUpdates { @override int get hashCode => - hashValues(polygonsToAdd, polygonIdsToRemove, polygonsToChange); + Object.hash(polygonsToAdd, polygonIdsToRemove, polygonsToChange); @override String toString() { diff --git a/lib/src/polyline_updates.dart b/lib/src/polyline_updates.dart index b22ba3e..89cc2cb 100644 --- a/lib/src/polyline_updates.dart +++ b/lib/src/polyline_updates.dart @@ -81,7 +81,7 @@ class _PolylineUpdates { @override int get hashCode => - hashValues(polylinesToAdd, polylineIdsToRemove, polylinesToChange); + Object.hash(polylinesToAdd, polylineIdsToRemove, polylinesToChange); @override String toString() { diff --git a/lib/src/snapshot_options.dart b/lib/src/snapshot_options.dart index 222c46d..dbfa854 100644 --- a/lib/src/snapshot_options.dart +++ b/lib/src/snapshot_options.dart @@ -45,7 +45,7 @@ class SnapshotOptions { } @override - int get hashCode => hashValues(showBuildings, showPointsOfInterest); + int get hashCode => Object.hash(showBuildings, showPointsOfInterest); @override String toString() => diff --git a/lib/src/ui.dart b/lib/src/ui.dart index d650a2a..71c00a5 100644 --- a/lib/src/ui.dart +++ b/lib/src/ui.dart @@ -86,7 +86,7 @@ class MinMaxZoomPreference { } @override - int get hashCode => hashValues(minZoom, maxZoom); + int get hashCode => Object.hash(minZoom, maxZoom); @override String toString() { diff --git a/pubspec.yaml b/pubspec.yaml index ff7ca9e..da44e27 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ repository: https://github.com/LuisThein/apple_maps_flutter issue_tracker: https://github.com/LuisThein/apple_maps_flutter/issues environment: - sdk: ">=2.12.0 <3.0.0" + sdk: ">=2.14.0 <3.0.0" flutter: ">=1.17.0" dependencies: From 75b89c19ef3bdac294e9555a99942b53716d4e32 Mon Sep 17 00:00:00 2001 From: zhengzeqin Date: Sat, 20 Jul 2024 14:46:18 +0800 Subject: [PATCH 2/2] update version Signed-off-by: zhengzeqin --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index da44e27..8fb876c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: apple_maps_flutter description: This plugin uses the Flutter platform view to display an Apple Maps widget. -version: 1.3.0 +version: 1.4.0 homepage: https://luisthein.de repository: https://github.com/LuisThein/apple_maps_flutter issue_tracker: https://github.com/LuisThein/apple_maps_flutter/issues