Skip to content

Commit

Permalink
Use Object.hash instead of hashValues (#1431)
Browse files Browse the repository at this point in the history
* Use Object.all instead of hashValues

* Use Object.hash instead of .hashAll

* dart format
  • Loading branch information
irvine5k authored Jan 10, 2025
1 parent b2bfef6 commit d4aee36
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mapbox_gl_platform_interface/lib/src/camera.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class CameraPosition {
}

@override
int get hashCode => hashValues(bearing, target, tilt, zoom);
int get hashCode => Object.hash(bearing, target, tilt, zoom);

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

@override
int get hashCode => hashValues(southwest, northeast);
int get hashCode => Object.hash(southwest, northeast);
}

/// A geographical area representing a non-aligned quadrilateral
Expand Down Expand Up @@ -164,7 +164,7 @@ class LatLngQuad {
}

@override
int get hashCode => hashValues(topLeft, topRight, bottomRight, bottomLeft);
int get hashCode => Object.hash(topLeft, topRight, bottomRight, bottomLeft);
}

/// User's observed location
Expand Down
2 changes: 1 addition & 1 deletion mapbox_gl_platform_interface/lib/src/ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class MinMaxZoomPreference {
}

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

@override
String toString() {
Expand Down
2 changes: 1 addition & 1 deletion mapbox_gl_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ dependencies:
meta: ^1.0.5

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.14.0 <3.0.0'
flutter: ">=2.0.0"
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ flutter:
default_package: mapbox_gl_web

environment:
sdk: '>=2.12.0 <3.0.0'
sdk: '>=2.14.0 <3.0.0'
# Flutter versions prior to 1.10 did not support the flutter.plugin.platforms map.
flutter: ">=2.0.0"

0 comments on commit d4aee36

Please sign in to comment.