createCode method

Future<Code> createCode(
  1. String sdkId,
  2. Code c
)

Implementation

Future<Code> createCode(String sdkId, Code c) async {
	final res = await _methodChannel.invokeMethod<String>(
		'CodeApi.createCode',
		{
			"sdkId": sdkId,
			"c": jsonEncode(Code.encode(c)),
		}
	);
	if (res == null) throw AssertionError("received null result from platform method createCode");
	final parsedResJson = jsonDecode(res);
	return Code.fromJSON(parsedResJson);
}