Added == operator to WebUri

This commit is contained in:
Daisuke Ueta 2023-12-25 18:11:09 +09:00
parent 5f2885c9d0
commit 3264599822
1 changed files with 11 additions and 0 deletions

View File

@ -188,6 +188,17 @@ class WebUri implements Uri {
@override @override
String get userInfo => _uri.userInfo; String get userInfo => _uri.userInfo;
@override
bool operator ==(Object other) {
if (identical(this, other)) {
return true;
}
return other is WebUri &&
_uri == other._uri &&
_rawValue == other._rawValue &&
forceToStringRawValue == other.forceToStringRawValue;
}
///If [forceToStringRawValue] is `true` or [isValidUri] is `false`, it returns [rawValue], ///If [forceToStringRawValue] is `true` or [isValidUri] is `false`, it returns [rawValue],
///otherwise the value of [uriValue]`.toString()`. ///otherwise the value of [uriValue]`.toString()`.
@override @override