Skip to content
pubscout

profanity_filter

2.0.0, released 5 years ago by an unverified publisher

Check and censor strings against profanity and obscene words with a built-in English list.

WASM-ready
$ flutter pub add profanity_filter
Source repository

What it does

Provides a simple Dart class to detect profanity, retrieve profane words, and censor strings. Includes a default English word list from LDNOOBW and supports custom words, additions, and exclusions.

AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to check user input for profanity in chat or comments.
  • You want to automatically censor bad words in strings with customizable lists.

Skip it when

  • You need advanced natural language processing beyond simple dictionary lookup.

Strengths

  • Includes a default English profanity word list out of the box.
  • Supports custom lists, additions, and exclusions.
  • Case-agnostic censorship and exact substring matching.

Weaknesses

  • Relies on a static word list which may miss creative spellings or context-dependent slurs.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
final filter = ProfanityFilter();
String badString = 'You are an ass';
bool hasProfanity = filter.hasProfanity(badString);
String cleanString = filter.censor(badString);

Alternatives

Packages that do the same job and could replace profanity_filter.