Skip to content
pubscout

badword_guard

1.0.1, released 3 years ago by mdshahidulislam.tech

Detect and filter offensive language and bad words in text input.

WASM-ready
$ flutter pub add badword_guard
Source repository

What it does

BadWord Guard is a Flutter plugin that scans text inputs to detect and highlight offensive words or phrases. It also allows you to automatically replace inappropriate words with custom characters or alternatives.

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

Use it when

  • You need to filter user-generated content for bad words.
  • You want to perform real-time text moderation on text inputs.

Skip it when

  • You require complex AI-driven sentiment analysis beyond keyword filtering.
  • You need natural language understanding that goes past literal word matching.

Strengths

  • Provides easy-to-use methods for detecting and filtering bad language.
  • Supports real-time processing of user input.
  • Allows customizable word lists and replacement options.

Weaknesses

  • Relies on basic keyword matching which can be bypassed with creative spelling.
  • Limited documentation on advanced customization options in the README.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1

not documented

import 'package:badword_guard/badword_guard.dart';

void main() {
  final LanguageChecker checker = LanguageChecker();
  String inputText = "This is a sample text with a bad word: [BADWORD HERE]!";
  
  bool containsBadWord = checker.containsBadLanguage(inputText);
  print(containsBadWord);
  
  String filteredText = checker.filterBadWords(inputText);
  print(filteredText);
}

Alternatives

Packages that do the same job and could replace badword_guard.

Works with

Packages commonly used together with badword_guard: ones it builds on, ones built on it, and its own family.