LocalToxicityGuardPlatform class abstract

Inheritance
  • Object
  • PlatformInterface
  • LocalToxicityGuardPlatform
Implementers

Constructors

LocalToxicityGuardPlatform()
Constructs a LocalToxicityGuardPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
isReady bool
Whether the toxicity detection is ready to use
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

analyzeText(String text) Future<ToxicityResult?>
Analyze text for toxicity Returns null if the service is not initialized
getDetailedAnalysis(String text) Future<Map<String, double>?>
Get detailed toxicity breakdown
getPlatformVersion() Future<String?>
initialize() Future<bool>
Initialize the toxicity detection model Call this early in your app lifecycle (e.g., in main() or app startup)
isToxic(String text, {double threshold = 0.5}) Future<bool>
Quick check if text is considered toxic Returns false if service is not available
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance LocalToxicityGuardPlatform
The default instance of LocalToxicityGuardPlatform to use.
getter/setter pair