FutureManager<T extends Object> constructor

FutureManager<T extends Object>({
  1. FutureFunction<T>? futureFunction,
  2. bool reloading = true,
  3. ManagerCacheOption cacheOption = const ManagerCacheOption.non(),
  4. SuccessCallBack<T>? onSuccess,
  5. VoidCallback? onDone,
  6. ErrorCallBack? onError,
})

Create a FutureManager instance, You can define a futureFunction here then asyncOperation will be call immediately

Implementation

FutureManager({
  this.futureFunction,
  this.reloading = true,
  this.cacheOption = const ManagerCacheOption.non(),
  this.onSuccess,
  this.onDone,
  this.onError,
}) {
  if (futureFunction != null) {
    asyncOperation(
      futureFunction!,
      reloading: reloading,
      onSuccess: onSuccess,
      onDone: onDone,
      onError: onError,
    );
  }
}