currentToken property Null safety

Future<OAuthToken?> currentToken

Get Current Token Method 현재 저장된 Token 정보를 가져옵니다.

Implementation

Future<OAuthToken?> get currentToken async {
  try {
    final json = await _channel.invokeMapMethod('getCurrentToken');
    debugPrint('currentToken : $json');
    return OAuthToken.fromJson(Map<String, dynamic>.from(json!));
  } catch (e) {
    debugPrint('currentToken error : $e');
    return null;
  }
}