Skip to content

Commit 616dcaf

Browse files
Merge pull request pichillilorenzo#1941 from daisukeueta/master
Added == operator and hashCode to WebUri
2 parents 5f2885c + e000cd8 commit 616dcaf

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

flutter_inappwebview_platform_interface/lib/src/web_uri.dart

+17
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,23 @@ class WebUri implements Uri {
188188
@override
189189
String get userInfo => _uri.userInfo;
190190

191+
@override
192+
bool operator ==(Object other) =>
193+
identical(this, other) ||
194+
other is WebUri &&
195+
runtimeType == other.runtimeType &&
196+
_uri == other._uri &&
197+
_rawValue == other._rawValue &&
198+
_isValidUri == other._isValidUri &&
199+
forceToStringRawValue == other.forceToStringRawValue;
200+
201+
@override
202+
int get hashCode =>
203+
_uri.hashCode ^
204+
_rawValue.hashCode ^
205+
_isValidUri.hashCode ^
206+
forceToStringRawValue.hashCode;
207+
191208
///If [forceToStringRawValue] is `true` or [isValidUri] is `false`, it returns [rawValue],
192209
///otherwise the value of [uriValue]`.toString()`.
193210
@override

0 commit comments

Comments
 (0)