getRequiredRegulatoryFeatures method
Returns the regulatory features Apple reports as required for the current user (iOS 26.4+).
Returns an empty set on Android. Throws UnsupportedPlatformException on iOS below 26.4 and in apps built with a pre-26.4 SDK.
Implementation
@override
Future<Set<AgeRegulatoryFeature>> getRequiredRegulatoryFeatures() async {
try {
final raw = await methodChannel.invokeListMethod<String>(
'getRequiredRegulatoryFeatures',
);
if (raw == null) {
return const {};
}
return raw
.map(AgeRegulatoryFeature.fromName)
.whereType<AgeRegulatoryFeature>()
.toSet();
} on PlatformException catch (e) {
throw _handlePlatformException(e);
}
}