change bounce to callback

This commit is contained in:
krawieck 2020-09-22 16:33:02 +02:00
parent df4e1253b4
commit a675377378
1 changed files with 4 additions and 4 deletions

View File

@ -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();
});