ContentFilterResult class

Mofilo Content Filter - Clean, Simple, Effective

3 Layers:

  1. Dangerous phrases (context-aware) - "attack children" not "attack"
  2. Hard slurs (always block) - racial slurs, profanity
  3. 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