Skip to content

Commit

Permalink
fix: remove usage hashValues in favor Object.hash (#69)
Browse files Browse the repository at this point in the history
* fix: remove usage hashValues in favor Object.hash

Signed-off-by: Michaël Ohayon <[email protected]>

* Upgrade version

Signed-off-by: Michaël Ohayon <[email protected]>

* Upgrade Flutter version used in CI

Signed-off-by: Michaël Ohayon <[email protected]>

---------

Signed-off-by: Michaël Ohayon <[email protected]>
  • Loading branch information
mikklfr authored Jan 23, 2025
1 parent a1566f0 commit 2848c56
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install Flutter
uses: subosito/flutter-action@v1
with:
flutter-version: '2.0.3'
flutter-version: '3.27.3'
- name: Install dependencies
run: flutter pub get
- name: Run dart analyze
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 1.4.0

* Flutter 3.27.1 compatibility, replace `ui.hash*` with `Object.hash*

## 1.3.0

* Animate marker position changes instead of removing and re-adding
Expand Down
2 changes: 1 addition & 1 deletion lib/src/annotation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/annotation_updates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class _AnnotationUpdates {

@override
int get hashCode =>
hashValues(annotationsToAdd, annotationIdsToRemove, annotationsToChange);
Object.hash(annotationsToAdd, annotationIdsToRemove, annotationsToChange);

@override
String toString() {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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() =>
Expand Down
2 changes: 1 addition & 1 deletion lib/src/circle_updates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class _CircleUpdates {

@override
int get hashCode =>
hashValues(circlesToAdd, circleIdsToRemove, circlesToChange);
Object.hash(circlesToAdd, circleIdsToRemove, circlesToChange);

@override
String toString() {
Expand Down
4 changes: 2 additions & 2 deletions lib/src/location.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -116,5 +116,5 @@ class LatLngBounds {
}

@override
int get hashCode => hashValues(southwest, northeast);
int get hashCode => Object.hash(southwest, northeast);
}
2 changes: 1 addition & 1 deletion lib/src/polygon_updates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class _PolygonUpdates {

@override
int get hashCode =>
hashValues(polygonsToAdd, polygonIdsToRemove, polygonsToChange);
Object.hash(polygonsToAdd, polygonIdsToRemove, polygonsToChange);

@override
String toString() {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/polyline_updates.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class _PolylineUpdates {

@override
int get hashCode =>
hashValues(polylinesToAdd, polylineIdsToRemove, polylinesToChange);
Object.hash(polylinesToAdd, polylineIdsToRemove, polylinesToChange);

@override
String toString() {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/snapshot_options.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SnapshotOptions {
}

@override
int get hashCode => hashValues(showBuildings, showPointsOfInterest);
int get hashCode => Object.hash(showBuildings, showPointsOfInterest);

@override
String toString() =>
Expand Down
2 changes: 1 addition & 1 deletion lib/src/ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class MinMaxZoomPreference {
}

@override
int get hashCode => hashValues(minZoom, maxZoom);
int get hashCode => Object.hash(minZoom, maxZoom);

@override
String toString() {
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
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

environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.14.0 <3.0.0"
flutter: ">=1.17.0"

dependencies:
Expand Down

0 comments on commit 2848c56

Please sign in to comment.