logInWithKakaoTalk method Null safety

Future<Result<OAuthToken>> logInWithKakaoTalk()

Implementation

Future<Result<OAuthToken>> logInWithKakaoTalk() async {
  try {
    final result = await (_channel
        .invokeMapMethod<String, dynamic>('logInWithKakaoTalk'));
    return Result(() => OAuthToken.fromJson(result!));
  } on PlatformException catch (e) {
    return Result.error(KakaoSdkError.fromPlatformException(e));
  }
}