getUserByPhoneNumber method

Future<User> getUserByPhoneNumber(
  1. String sdkId,
  2. String phoneNumber
)

Implementation

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