setLoadingWithDelay method

Future<void> setLoadingWithDelay(
  1. bool loading,
  2. Duration delay
)

Sets loading state with a delay.

Implementation

Future<void> setLoadingWithDelay(bool loading, Duration delay) async {
  await Future.delayed(delay);
  _isLoading = loading;
  notifyListeners();
}