change bounce to callback
This commit is contained in:
parent
df4e1253b4
commit
a675377378
|
@ -7,13 +7,13 @@ import 'ref.dart';
|
|||
|
||||
class Debounce {
|
||||
final bool loading;
|
||||
final void Function() bounce;
|
||||
final void Function() callback;
|
||||
|
||||
void call() => bounce();
|
||||
void call() => callback();
|
||||
|
||||
const Debounce({
|
||||
@required this.loading,
|
||||
@required this.bounce,
|
||||
@required this.callback,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ Debounce useDebounce(
|
|||
|
||||
return Debounce(
|
||||
loading: loading.value,
|
||||
bounce: () {
|
||||
callback: () {
|
||||
cancel();
|
||||
start();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue