vulgar_filter

This plugin provides functionality to filter out vulgar words from text input. It can be used in chat applications, comment sections, or any other place where user-generated content is allowed. The plugin is easy to integrate and highly customizable to suit your specific needs.

Installation

Add the following to your pubspec.yaml file:

dependencies:
    vulgar_filter: latest_version

Then run:

flutter pub get

Usage

  • Import
import 'package:vulgar_filter/vulgar_filter.dart';
  • Filter the vulgar_filter word:
void main() {
    String text = "This is some example text with bad words.";
    String filteredText = VulgarFilter.filterVulgarWords(text)

    print(filteredText); // Output: This is some example text with **** words.
}