setRuntimeEnvironment static method

Future<BaseResponse> setRuntimeEnvironment(
  1. String environment
)

Implementation

static Future<BaseResponse> setRuntimeEnvironment(String environment) async {
  List<Object?>? response = await _channel
      .invokeMethod('setRuntimeEnvironment', {"environment": environment});
  BaseResponse result = new BaseResponse(false, null);
  if (response != null) {
    if (response[0] != null) {
      result = new BaseResponse(response[0].toString() == "true", null);
    }
    if (response[1] != null) {
      GenericError error =
          GenericError.fromJson(json.decode(response[1]!.toString()));
      result = new BaseResponse(false, error);
    }
    return result;
  }
  return result;
}