general_lib_execute method

FutureOr<T> general_lib_execute({
  1. Duration? timeLimit,
  2. FutureOr<T> onTimeout()?,
  3. required FutureOr<T> onNullData(),
  4. ExecuteOnErrorDart<T>? onError,
  5. bool isThrowOnError = true,
})

Implementation

FutureOr<T> general_lib_execute({
  Duration? timeLimit,
  FutureOr<T> Function()? onTimeout,
  required FutureOr<T> Function() onNullData,
  ExecuteOnErrorDart<T>? onError,
  bool isThrowOnError = true,
}) async {
  return (await general_lib_execute_or_null(
        timeLimit: timeLimit,
        onTimeout: onTimeout,
        onError: onError,
        isThrowOnError: isThrowOnError,
      )) ??
      await onNullData();
}