getUserStatus method
Fetches the user's Play age verification status via the MethodChannel.
Returns an AgeSignalResult containing:
userStatus: VERIFIED / UNVERIFIEDageLowerandageUpperbounds (if available)installId: unique identifier of the Play installmostRecentApprovalDate: date of last verificationerror: any error encountered during the verification process
If an exception occurs while invoking the platform method, it is caught
and returned as the error field in the AgeSignalResult.
Implementation
@override
Future<AgeSignalResult> getUserStatus() async {
try {
final Map<dynamic, dynamic> res =
await methodChannel.invokeMethod('getUserStatus');
return AgeSignalResult.fromMap(Map<String, dynamic>.from(res));
} catch (e) {
return AgeSignalResult(error: e.toString());
}
}