currentUser property Null safety

Future<Result<User>> currentUser

Get Current User

Implementation

Future<Result<User>> get currentUser async {
  try {
    final result = await _channel.invokeMapMethod('getUserMe');
    return Result.value(User.fromJson(Map<String, dynamic>.from(result!)));
  } on PlatformException catch (e) {
    debugPrint('currentUser error : $e');
    return Result.error(KakaoSdkError.fromPlatformException(e));
  } catch (e) {
    debugPrint('currentUser error : $e');
    return Result.error(e);
  }
}