FutureManager<T extends Object> constructor
FutureManager<T extends Object> ({
- FutureFunction<
T> ? futureFunction, - bool reloading = true,
- bool reportError = true,
- ManagerCacheOption cacheOption = const ManagerCacheOption.non(),
- SuccessCallBack<
T> ? onSuccess, - VoidCallback? onDone,
- ErrorCallBack? onError,
Create a FutureManager instance, You can define a futureFunction here then execute will be call immediately
Implementation
FutureManager({
this.futureFunction,
this.reloading = true,
this.reportError = true,
this.cacheOption = const ManagerCacheOption.non(),
this.onSuccess,
this.onDone,
this.onError,
}) : super(FutureManagerValue<T>.initial()) {
if (futureFunction != null) {
execute(
futureFunction!,
reloading: reloading,
onSuccess: onSuccess,
onDone: onDone,
onError: onError,
);
}
}