NsfwResult class
NsfwResult class stores the results of the NSFW detection.
Constructors
- NsfwResult({required bool isNsfw, required double score, required double safeScore})
- Constructor for creating an instance of NsfwResult
-
NsfwResult.fromJson(Map<
String, dynamic> json) -
Creates a result from a JSON object.
factory
Properties
- classification → NsfwClassification
-
Classification based on the NSFW score.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- isNsfw → bool
-
Indicates if the content is NSFW
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- safeScore → double
-
The safe score of the image
final
- score → double
-
The NSFW score of the image
final
Methods
-
copyWith(
{bool? isNsfw, double? score, double? safeScore}) → NsfwResult - Returns a copy of this result with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Serializes this result to a JSON-compatible map.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override