age_verification 0.2.4
age_verification: ^0.2.4 copied to clipboard
A Flutter plugin for querying platform age signals via Google Play Age Signals on Android and Apple DeclaredAgeRange on iOS, for regional age verification compliance.
0.2.4 #
iOS #
- Added
skipEligibilityCheckparameter toverifyAge— whentrue, theisEligibleForAgeFeaturescheck on iOS 26.2+ is bypassed andrequestAgeRangeis called directly; useful ifisEligibleForAgeFeatureshangs or is unreliable in your region. Has no effect on Android. Defaults tofalse(existing behavior).
0.2.3 #
Updated Readme, No Code Changes
0.2.2 #
iOS #
- Replaced deprecated
UIApplication.keyWindowandUIWindowScene.windowsusage inpresentationViewController()withUIWindowScene.keyWindow(available since iOS 15); primary path targets the foreground-active scene, fallback searches all connected scenes
Breaking changes #
verifyAgeparameterageGatesis now named instead of positional — call sites must be updated toverifyAge(ageGates: [...])orverifyAge()AgeVerificationis now a singleton — useAgeVerification.instanceinstead of constructing instances directly
Housekeeping #
- Added
topicstopubspec.yamlfor pub.dev discoverability - Reformatted Android and iOS source files to consistent 4-space indentation (no logic changes)
0.2.1 #
0.2.0 #
Breaking changes #
- Renamed
AgeSignalsStatus→AgeVerificationStatusfor naming consistency across the public API
0.1.0 #
Initial working release.
Android #
- Integrated Google Play Age Signals API (
com.google.android.play:age-signals:0.0.3) - Implements
AgeSignalsManagerFactory,AgeSignalsManager.checkAgeSignals(), and fullAgeSignalsVerificationStatusmapping - Reports
ageLower,ageUpper, andinstallIdfromAgeSignalsResult - Maps all
AgeSignalsExceptionerror codes to typedAgeVerificationErrorCodevalues - Mock mode uses Google's official
FakeAgeSignalsManagerfor accurate simulation
iOS #
- Integrated Apple DeclaredAgeRange framework (iOS 26.0+)
- Calls
AgeRangeService.shared.requestAgeRange(ageGates:in:)with 1–3 age gates - Checks
isEligibleForAgeFeatureson iOS 26.2+ to skip prompt for non-applicable regions - Maps
AgeRangeDeclaration(.selfDeclared,.guardianDeclared) toAgeDeclarationSource - Catches
AgeRangeService.Error.notAvailableand.invalidRequestas typed errors - Returns
apiNotAvailableon iOS < 26.0 or when DeclaredAgeRange is not linked - Uses Swift Package Manager (CocoaPods podspec added in 0.2.1)
Dart #
- Type-safe pigeon channel:
AgeVerificationApi,AgeVerificationResult,AgeVerificationStatus,AgeDeclarationSource,AgeVerificationErrorCode - Public API:
AgeVerification.init({mockConfig})andAgeVerification.verifyAge(ageGates) AgeVerificationMockConfig— pass toinit()to bypass native APIs on both platforms for testing
0.0.1 #
- Initial plugin scaffold.