ScanResult class
The result of scanning a single media file (image or video).
Constructors
-
ScanResult({required String identifier, required String mediaType, required List<
NsfwLabel> labels, int frameCount = 1}) -
const
-
ScanResult.fromMap(Map<
String, dynamic> map) -
factory
Properties
- frameCount → int
-
Number of frames scanned (1 for images, N for videos).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
The file path or identifier of the scanned media.
final
- isNsfw → bool
-
Whether the content is considered NSFW based on the global default threshold.
no setter
-
labels
→ List<
NsfwLabel> -
All classification labels sorted by confidence (highest first).
final
- mediaType → String
-
The media type ("image" or "video").
final
- nsfwScore → double
-
The NSFW confidence score (0.0 to 1.0). Returns 0.0 if no nudity label.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
isNsfwAbove(
double threshold) → bool -
Whether the content was classified as NSFW above a custom
threshold. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited