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
shawon1fb
2022-07-15 22:55:10 +0600
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
79ddfb5e76ee5ead3133d88a8e960ca65824dcb6
79ddfb5e
1 parent
0318ae38
Debouncer sound null safety
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
lib/get_rx/src/rx_workers/utils/debouncer.dart
lib/get_rx/src/rx_workers/utils/debouncer.dart
View file @
79ddfb5
...
...
@@ -9,14 +9,14 @@ import 'dart:async';
/// delayed( () => print( 'called after 1 sec' ));
/// ```
class
Debouncer
{
final
Duration
?
delay
;
final
Duration
delay
;
Timer
?
_timer
;
Debouncer
({
this
.
delay
});
Debouncer
({
required
this
.
delay
});
void
call
(
void
Function
()
action
)
{
_timer
?.
cancel
();
_timer
=
Timer
(
delay
!
,
action
);
_timer
=
Timer
(
delay
,
action
);
}
/// Notifies if the delayed call is active.
...
...
Please
register
or
login
to post a comment