ContentFilterResult class
Mofilo Content Filter - Clean, Simple, Effective
3 Layers:
- Dangerous phrases (context-aware) - "attack children" not "attack"
- Hard slurs (always block) - racial slurs, profanity
- Scunthorpe allowlist (override) - grape, therapist, etc.
Constructors
-
ContentFilterResult({required bool isAllowed, String? reason, List<
String> violations = const [], ContentFilterSeverity severity = ContentFilterSeverity.none}) - ContentFilterResult.allowed()
-
factory
- ContentFilterResult.blocked(String reason)
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAllowed → bool
-
final
- isBlocked → bool
-
no setter
- reason → String?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- severity → ContentFilterSeverity
-
final
-
violations
→ List<
String> -
final
Methods
-
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