Update web_uri.dart

updated WebUri operator == and hashCode with the generated version
This commit is contained in:
Lorenzo Pichilli 2023-12-25 18:04:24 +01:00 committed by GitHub
parent 3264599822
commit e000cd8a4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 9 deletions

View File

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