flutter_nsfw_detector_text library
A pure-Dart content filtering engine for Flutter. Provides O(1) keyword scanning, profanity detection, and leet-speak normalization.
Classes
- KeywordFilter
- A filter that detects specific keywords using compiled regular expressions. Natively handles padding evasion (e.g., "b.a.d").
- NativeModelTextClassifier
- Abstract bridge for native ML-powered text classification.
- NsfwTextInputFormatter
- A TextInputFormatter that blocks or censors text input in real-time as the user types.
- NsfwTextValidator
- A FormField validator that checks text on form submission.
- ProfanityFilter
- A filter specifically designed for profanity detection. Uses word-boundary tokenization and O(1) set lookups, along with leet-speak normalization.
- RegexFilter
- A filter that uses raw Regular Expressions to detect patterns.
- TextFilter
- Abstract base class for all text filters.
- TextMatch
- Represents a matched flagged word or phrase within the scanned text.
- TextNormalizer
- Provides utilities for normalizing text to detect evaded content.
- TextScanner
- The main entry point for scanning text against multiple filters. Coordinates both Layer 1 (sync Dart filters) and Layer 2 (async Native ML bridge).
- TextScanResult
- Represents the result of a text scan operation.
Enums
- FilterCategory
- Represents the category of flagged content.
- NsfwInputMode
- The mode for handling input that triggers the NsfwTextInputFormatter.