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 15:55:39 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
afb03bddf81561b7ddf476079848c4240ed67d0a
afb03bdd
1 parent
29f349ce
fix widget extensions
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
lib/src/state_manager/rx/rx_workers/rx_workers.dart
lib/src/utils/extensions/widget_extensions.dart
lib/src/state_manager/rx/rx_workers/rx_workers.dart
View file @
afb03bd
...
...
@@ -37,7 +37,7 @@ Worker everAll(List<RxInterface> listener, Function(dynamic) callback,
return
Worker
(
cancel
,
'[everAll]'
);
}
Worker
once
(
RxInterface
listener
,
Function
(
dynamic
)
callback
,
Worker
once
<
T
>(
RxInterface
<
T
>
listener
,
Function
(
T
)
callback
,
{
bool
condition
=
true
})
{
StreamSubscription
sub
;
int
times
=
0
;
...
...
@@ -59,7 +59,7 @@ Worker once(RxInterface listener, Function(dynamic) callback,
return
Worker
(
cancel
,
'[once]'
);
}
Worker
interval
(
RxInterface
listener
,
Function
(
dynamic
)
callback
,
Worker
interval
<
T
>(
RxInterface
<
T
>
listener
,
Function
(
T
)
callback
,
{
Duration
time
,
bool
condition
=
true
})
{
bool
debounceActive
=
false
;
StreamSubscription
sub
=
listener
.
subject
.
stream
.
listen
((
event
)
async
{
...
...
@@ -77,7 +77,7 @@ Worker interval(RxInterface listener, Function(dynamic) callback,
return
Worker
(
cancel
,
'[interval]'
);
}
Worker
debounce
(
RxInterface
listener
,
Function
(
dynamic
)
callback
,
Worker
debounce
<
T
>(
RxInterface
<
T
>
listener
,
Function
(
T
)
callback
,
{
Duration
time
})
{
final
_debouncer
=
Debouncer
(
delay:
time
??
Duration
(
milliseconds:
800
));
StreamSubscription
sub
=
listener
.
subject
.
stream
.
listen
((
event
)
{
...
...
lib/src/utils/extensions/widget_extensions.dart
View file @
afb03bd
...
...
@@ -42,7 +42,7 @@ extension WidgetMarginX on Widget {
double
right
=
0.0
,
double
bottom
=
0.0
,
})
=>
Padding
(
Container
(
margin:
EdgeInsets
.
only
(
top:
top
,
left:
left
,
right:
right
,
bottom:
bottom
),
child:
this
);
...
...
Please
register
or
login
to post a comment