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
Jonatas
2021-02-13 03:48:20 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c0e8d5ceda1e0ba9a54dbc1117e23687e9b11106
c0e8d5ce
1 parent
c300f032
update to 3.25.3
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
CHANGELOG.md
lib/get_rx/src/rx_types/rx_core/rx_impl.dart
pubspec.yaml
test/rx/rx_workers_test.dart
CHANGELOG.md
View file @
c0e8d5c
## [3.25.3]
-
Fix bindStream error 'Object.noSuchMethod'.
## [3.25.2]
-
Improved Workers system to accept a list of works
...
...
lib/get_rx/src/rx_types/rx_core/rx_impl.dart
View file @
c0e8d5c
...
...
@@ -116,7 +116,9 @@ mixin RxObjectMixin<T> on NotifyManager<T> {
/// Closing the subscription will happen automatically when the observer
/// Widget ([GetX] or [Obx]) gets unmounted from the Widget tree.
void
bindStream
(
Stream
<
T
>
stream
)
{
_subscriptions
[
subject
].
add
(
stream
.
listen
((
va
)
=>
value
=
va
));
final
listSubscriptions
=
_subscriptions
[
subject
]
??=
<
StreamSubscription
>[];
listSubscriptions
.
add
(
stream
.
listen
((
va
)
=>
value
=
va
));
}
}
...
...
pubspec.yaml
View file @
c0e8d5c
name
:
get
description
:
Open screens/snackbars/dialogs without context, manage states and inject dependencies easily with GetX.
version
:
3.25.
2
version
:
3.25.
3
homepage
:
https://github.com/jonataslaw/getx
environment
:
...
...
test/rx/rx_workers_test.dart
View file @
c0e8d5c
import
'dart:async'
;
import
'package:flutter_test/flutter_test.dart'
;
import
'package:get/get.dart'
;
...
...
@@ -77,4 +79,20 @@ void main() {
await
Future
.
delayed
(
Duration
(
milliseconds:
100
));
expect
(
5
,
result
);
});
test
(
'bindStream test'
,
()
async
{
var
count
=
0
;
final
controller
=
StreamController
<
int
>();
final
rx
=
0
.
obs
;
rx
.
listen
((
value
)
{
count
=
value
;
});
rx
.
bindStream
(
controller
.
stream
);
expect
(
count
,
0
);
controller
.
add
(
555
);
await
Future
.
delayed
(
Duration
.
zero
);
expect
(
count
,
555
);
});
}
...
...
Please
register
or
login
to post a comment