preLoad method

void preLoad({
  1. required void onLoaded(
    1. CSDocsAuthenticationResponse auth
    ),
  2. required CSDocsSDK configuration,
})

Implementation

void preLoad({
  required void Function(CSDocsAuthenticationResponse auth) onLoaded,
  required CSDocsSDK configuration,
}) async {
  try {
    await methodChannel.invokeMethod(
      MethodChannels.preLoad.methodName,
      configuration.toJson(),
    );
  } on PlatformException catch (e) {
    throw CSDocsInternalErrorException(
      message: e.message,
      errorDescription:
          "Platform exception when calling preLoad method: ${e.message}",
    );
  } catch (e) {
    throw CSDocsInternalErrorException(
      message: e.toString(),
      errorDescription:
          "Internal error when calling preLoad method: ${e.toString()}",
    );
  }
}