acquireToken method
Acquire a token interactively for the given scopes
return UserAdModel
contains user information but token and expiration date
Implementation
Future<UserAdModel?> acquireToken({required List<String> scopes}) async {
var res = <String, dynamic>{'scopes': scopes};
try {
final String? json = await _channel.invokeMethod('acquireToken', res);
UserAdModel userAdModel = UserAdModel.fromJson(jsonDecode(json!));
return await _getUserModel(userAdModel);
} on PlatformException catch (e) {
throw _convertException(e);
}
}