PlatformSetupReport class
Snapshot of host-app platform setup. Returned by
NsfwDetector.instance.checkPlatformSetup() so apps can verify their
Info.plist (iOS) / AndroidManifest.xml declarations are in place
before invoking any media API — the alternative on iOS is SIGABRT the
first time the OS sees a missing NSPhotoLibraryUsageDescription.
Each field is true when the corresponding usage description / manifest
permission is declared by the host app, false when it is missing.
Constructors
- PlatformSetupReport({required bool photoLibraryUsageDescription, required bool cameraUsageDescription})
-
const
- PlatformSetupReport.allOk()
-
All-ok constant. Used as the default-implementation return value so
platforms / test mocks that don't override
checkPlatformSetupdon't surface false negatives.const - PlatformSetupReport.fromMap(Map map)
-
factory
Properties
- cameraUsageDescription → bool
-
iOS:
NSCameraUsageDescriptionpresent inInfo.plist. Android:CAMERAdeclared in the manifest.final - hashCode → int
-
The hash code for this object.
no setterinherited
- isComplete → bool
-
truewhen every checked key is present. Apps can short-circuit on this in production and only inspect individual fields when surfacing a setup-guide UI in development builds.no setter -
missingKeys
→ List<
String> -
The keys whose declarations are missing on the host app. Empty when
isCompleteistrue. Useful for building "add these to Info.plist" hint UIs.no setter - photoLibraryUsageDescription → bool
-
iOS:
NSPhotoLibraryUsageDescriptionpresent inInfo.plist. Android:READ_MEDIA_IMAGES/READ_MEDIA_VIDEO(API 33+) orREAD_EXTERNAL_STORAGE(API ≤ 32) declared in the manifest.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited