createUser method

Future<User> createUser(
  1. String sdkId,
  2. User user
)

Implementation

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