callPreCheckFn static method

Future<void> callPreCheckFn(
  1. bool? usePreCheckFn
)

Implementation

static Future<void> callPreCheckFn(bool? usePreCheckFn) async {
  if (preCheckFunction != null && (usePreCheckFn ?? Static.usePreCheckFunctionInHttpCalls ?? false)) {
    bool result = await preCheckFunction!();
    if (!result) {
      throw Exception('pre-check fn error');
    }
  }
}