MethodChannelLocalToxicityGuard class

An implementation of LocalToxicityGuardPlatform that uses method channels.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
isReady bool
Whether the toxicity detection is ready to use
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
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
inherited
getDetailedAnalysis(String text) Future<Map<String, double>?>
Get detailed toxicity breakdown
inherited
getPlatformVersion() Future<String?>
override
initialize() Future<bool>
Initialize the toxicity detection model Call this early in your app lifecycle (e.g., in main() or app startup)
inherited
isToxic(String text, {double threshold = 0.5}) Future<bool>
Quick check if text is considered toxic Returns false if service is not available
inherited
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