Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jonny Borges
2020-08-29 22:14:04 -0300
Browse Files
Options
Browse Files
Download
Plain Diff
Committed by
GitHub
2020-08-29 22:14:04 -0300
Commit
f7a17ada2d53316bbe4795fc15a464ea78fee008
f7a17ada
2 parents
16975d46
8b491582
Merge pull request #531 from roipeker/master
Rx equality fix
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
lib/src/state_manager/rx/rx_impl.dart
lib/src/state_manager/rx/rx_impl.dart
View file @
f7a17ad
...
...
@@ -106,13 +106,17 @@ class _RxImpl<T> implements RxInterface<T> {
String
toString
()
=>
value
.
toString
();
/// This equality override works for _RxImpl instances and the internal values.
bool
operator
==(
o
)
{
@override
bool
operator
==(
dynamic
o
)
{
// Todo, find a common implementation for the hashCode of different Types.
if
(
o
is
T
)
return
_value
==
o
;
if
(
o
is
_RxImpl
<
T
>)
return
_value
==
o
.
value
;
return
false
;
}
@override
int
get
hashCode
=>
_value
.
hashCode
;
void
close
()
{
_subscriptions
.
forEach
((
observable
,
subscription
)
=>
subscription
.
cancel
());
_subscriptions
.
clear
();
...
...
Please
register
or
login
to post a comment