createUserInGroup method

Future<User> createUserInGroup(
  1. String sdkId,
  2. String groupId,
  3. User user
)

Implementation

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