mirror of
https://github.com/krawieck/lemmur/
synced 2024-12-23 22:31:03 +01:00
add default for delayed loading
This commit is contained in:
parent
016537d8d2
commit
30adc2be63
@ -22,7 +22,8 @@ class DelayedLoading {
|
||||
/// When loading is [.start()]ed, it goes into a pending state
|
||||
/// and loading is triggered after [delayDuration].
|
||||
/// Everything can be reset with [.cancel()]
|
||||
DelayedLoading useDelayedLoading(Duration delayDuration) {
|
||||
DelayedLoading useDelayedLoading(
|
||||
[Duration delayDuration = const Duration(milliseconds: 500)]) {
|
||||
final loading = useState(false);
|
||||
final pending = useState(false);
|
||||
final timerHandle = useRef<Timer>(null);
|
||||
|
Loading…
Reference in New Issue
Block a user