Merge pull request #1941 from daisukeueta/master
Added == operator and hashCode to WebUri
This commit is contained in:
commit
616dcaf7a4
|
@ -188,6 +188,23 @@ class WebUri implements Uri {
|
||||||
@override
|
@override
|
||||||
String get userInfo => _uri.userInfo;
|
String get userInfo => _uri.userInfo;
|
||||||
|
|
||||||
|
@override
|
||||||
|
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],
|
///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
|
||||||
|
|
Loading…
Reference in New Issue