me static method Null safety
카카오 SDK를 통해 현재 로그인한 사용자의 정보를 불러옵니다.
사용자 정보 요청 중 SDK 오류가 발생한 경우 ApiFailureException throw 합니다. SDK 오류 이외의 예외는 Exception 객체를 rethrow 합니다. 정상적으로 처리가 완료되면 사용자 정보인 bool 객체를 반환합니다.
Implementation
static Future<User> me() async {
try {
final data = await _channel.invokeMethod('me');
return User.fromJson(Map<String, dynamic>.from(data));
} on PlatformException catch (error) {
throw ApiFailureException(error.code.apiFailureReason, error.message);
} catch (error) {
rethrow;
}
}