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
2020-09-02 13:37:11 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bdf7b06cd5efad8e6f8d89912567492b3f835f14
bdf7b06c
1 parent
32cc7b0d
add type to workers
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletions
lib/src/state_manager/rx/rx_core/rx_impl.dart
lib/src/state_manager/rx/rx_workers/rx_workers.dart
lib/src/state_manager/rx/rx_core/rx_impl.dart
View file @
bdf7b06
...
...
@@ -160,6 +160,16 @@ class RxBool extends _RxImpl<bool> {
RxBool
([
bool
initial
])
{
_value
=
initial
;
}
bool
operator
&(
bool
other
)
=>
other
&&
value
;
bool
operator
|(
bool
other
)
=>
other
||
value
;
bool
operator
^(
bool
other
)
=>
!
other
==
value
;
String
toString
()
{
return
value
?
"true"
:
"false"
;
}
}
class
RxDouble
extends
_RxImpl
<
double
>
{
...
...
lib/src/state_manager/rx/rx_workers/rx_workers.dart
View file @
bdf7b06
...
...
@@ -3,7 +3,7 @@ import 'package:get/get.dart';
import
'../rx_core/rx_interface.dart'
;
import
'utils/debouncer.dart'
;
Worker
ever
(
RxInterface
listener
,
Function
(
dynamic
)
callback
,
Worker
ever
<
T
>(
RxInterface
<
T
>
listener
,
Function
(
T
)
callback
,
{
bool
condition
=
true
})
{
StreamSubscription
sub
=
listener
.
subject
.
stream
.
listen
((
event
)
{
if
(
condition
)
callback
(
event
);
...
...
Please
register
or
login
to post a comment