selectFriends method
여러 명의 친구를 선택(멀티 피커)할 수 있는 친구 피커를 화면에 표시합니다.
Implementation
Future selectFriends({
required PickerFriendRequestParams params,
BuildContext? context,
}) async {
if (await TokenManagerProvider.instance.manager.getToken() == null) {
throw KakaoClientException(
ClientErrorCause.tokenNotFound,
'You must log in before using FriendPicker.',
);
}
var exception = _isParameterCorrect(params);
if (exception != null) {
throw exception;
}
if (kIsWeb) {
try {
return await _invokeWebPicker(params, 'multiple');
} catch (e) {
rethrow;
}
}
if (context == null) {
throw KakaoClientException(
ClientErrorCause.badParameter,
'FriendPicker requires context.',
);
}
if (!context.mounted) {
throw KakaoClientException(
ClientErrorCause.illegalState,
"Context is not mouned",
);
}
return await _navigateToWebView(context: context, params: params);
}