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
marco
2021-12-27 21:35:17 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
734594df7ac883ace80484527fdf23e9d6961121
734594df
1 parent
fa1888be
RxSet add: refresh only when value
was not yet in the set
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
lib/get_rx/src/rx_types/rx_iterables/rx_set.dart
lib/get_rx/src/rx_types/rx_iterables/rx_set.dart
View file @
734594d
...
...
@@ -37,9 +37,11 @@ class RxSet<E> extends SetMixin<E>
@override
bool
add
(
E
value
)
{
final
val
=
_value
.
add
(
value
);
refresh
();
return
val
;
final
hasAdded
=
_value
.
add
(
value
);
if
(
hasAdded
)
{
refresh
();
}
return
hasAdded
;
}
@override
...
...
Please
register
or
login
to post a comment