badword_guard 1.0.1
badword_guard: ^1.0.1 copied to clipboard
A Flutter plugin for detecting and filtering out offensive language and bad words in text input.
BadWord Guard - A Flutter Package for Bad Text Word Moderation #
BadWord Guard is a Flutter package that allows you to easily detect and filter out offensive language and bad words in text input. It helps you maintain a safe and respectful user environment by scanning and sanitizing user-generated content within your Flutter applications.
Features #
- Detect and Highlight Bad Words: Easily identify and highlight offensive words and phrases within user-generated text.
- Replace Bad Words: Automatically replace bad words with customizable alternatives or censor characters to keep your content clean.
- Customizable Filtering: Configure the plugin to match your content guidelines with customizable word lists and replacement options.
- Real-time Processing: Perform real-time checks on user input to prevent inappropriate content from being displayed or submitted.
Installation #
-
Add this package to your
pubspec.yaml
file:dependencies: badword_guard: ^1.0.0
copied to clipboard -
Run
flutter pub get
to install the package.
Usage #
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); // Output: true
String filteredText = checker.filterBadWords(inputText);
print(filteredText); // Output: "This is a sample text with a bad word: *******!"
}
For more detailed usage and customization options, please refer to the documentation.
Contributing #
We welcome contributions! If you have any ideas, bug fixes, or improvements, please open an issue or submit a pull request on our GitHub repository.
License #
This package is available under the MIT License. See the LICENSE file for more details.
About #
This package is developed and maintained by MD. SHAHIDUL ISLAM.
If you have any questions or need assistance, feel free to contact us at shahidul1425@cseku.ac.bd.