setup static method

Future<ScLoanSuccess> setup(
  1. ScLoanConfig config
)

Implementation

static Future<ScLoanSuccess> setup(ScLoanConfig config) async {
  try {
    String? setupResponse = await _channel.invokeMethod(
        'setup', <String, dynamic>{
      "gateway": config.gateway,
      "env": config.environment.index
    });
    return ScLoanSuccess.fromJson(setupResponse ?? "{}");
  } on PlatformException catch (e) {
    throw e.toScLoanError;
  }
}