createTarification method

Future<Tarification> createTarification(
  1. String sdkId,
  2. Tarification tarification
)

Implementation

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