accessToken property
calls the FB.getLoginStatus interop
check if a user is logged and return an accessToken data
Implementation
@override
Future<AccessToken?> get accessToken async {
if (!_initialized) return null;
Completer<LoginResult> completer = Completer();
fb.getLoginStatus(
allowInterop(
(jsResponse) {
this._handleResponse(jsResponse).then(
(result) => completer.complete(result),
);
},
),
);
final LoginResult result = await completer.future;
return result.accessToken;
}