处理 '==' operators should be non-nullable.

This commit is contained in:
Kuloud 2024-03-20 18:06:23 +08:00
parent 2330225394
commit 2c1bcdbd93
2 changed files with 6 additions and 6 deletions

View File

@ -54,10 +54,10 @@ class CameraPosition {
} }
@override @override
bool operator ==(dynamic other) { bool operator ==(Object other) {
if (identical(this, other)) return true; if (identical(this, other)) return true;
if (runtimeType != other.runtimeType) return false; if (runtimeType != other.runtimeType) return false;
final CameraPosition typedOther = other; final CameraPosition typedOther = other as CameraPosition;
return bearing == typedOther.bearing && return bearing == typedOther.bearing &&
target == typedOther.target && target == typedOther.target &&
tilt == typedOther.tilt && tilt == typedOther.tilt &&

View File

@ -40,10 +40,10 @@ class CameraTargetBounds {
dynamic toJson() => <dynamic>[bounds?.toJson()]; dynamic toJson() => <dynamic>[bounds?.toJson()];
@override @override
bool operator ==(dynamic other) { bool operator ==(Object other) {
if (identical(this, other)) return true; if (identical(this, other)) return true;
if (runtimeType != other.runtimeType) return false; if (runtimeType != other.runtimeType) return false;
final CameraTargetBounds typedOther = other; final CameraTargetBounds typedOther = other as CameraTargetBounds;
return bounds == typedOther.bounds; return bounds == typedOther.bounds;
} }
@ -86,10 +86,10 @@ class MinMaxZoomPreference {
dynamic toJson() => <dynamic>[minZoom, maxZoom]; dynamic toJson() => <dynamic>[minZoom, maxZoom];
@override @override
bool operator ==(dynamic other) { bool operator ==(Object other) {
if (identical(this, other)) return true; if (identical(this, other)) return true;
if (runtimeType != other.runtimeType) return false; if (runtimeType != other.runtimeType) return false;
final MinMaxZoomPreference typedOther = other; final MinMaxZoomPreference typedOther = other as MinMaxZoomPreference;
return minZoom == typedOther.minZoom && maxZoom == typedOther.maxZoom; return minZoom == typedOther.minZoom && maxZoom == typedOther.maxZoom;
} }