A Flutter library for checking if a given text contains any profanity words.
- Supports multiple languages: English, Spanish, Vietnamese (more can be added)
- Efficient profanity word checking algorithm
- Easy to integrate into Flutter projects
To start using flutter_profanity_words_checker
, ensure you have Flutter installed and set up in your project. Add the following dependency to your pubspec.yaml
:
dependencies:
flutter_profanity_words_checker:
git:
url: https://github.com/quocbao238/flutter_profanity_words_checker
ref: 1.0.0
import 'package:flutter_profanity_words_checker/flutter_profanity_words_checker.dart';
late final FlutterProfanityChecker _flutterProfanityChecker;
@override
void initState() {
super.initState();
_flutterProfanityChecker = FlutterProfanityChecker(language: Language.getByLanguageCode('en'));
_flutterProfanityChecker.init();
}
bool hasProfanityWords(String text) {
return _flutterProfanityChecker.hasCurseWords(text);
}
List<String> getProfanityWords(String text) {
return _flutterProfanityChecker.all(text);
}
void changeLanguage(Language language) {
_flutterProfanityChecker.changeLanguage(language);
}
This library is used to check if a given text contains any profanity words. We would like to express our gratitude to the following individuals and organizations:
- Robert James Gabriel: For creating and maintaining the foundation of this module.
- Coffee & Fun LLC: For their ongoing contributions and support in developing and maintaining this package.
- Jest team: For the testing framework that ensures the reliability and robustness of this module.
- coffeeandfun.com: For providing inspiration and valuable resources for profanity word lists.
- Eris-182: For their contributions and inspiration, particularly for the Vietnamese profanity word list.
- The creators and contributors of the profanity word lists:
- Google Profanity Words: Providing profanity word lists for English and Spanish.
- vn-badwords: Offering profanity word lists for Vietnamese.
Your efforts and contributions have greatly enriched this package and made it more effective in serving its purpose. Thank you!
- Documentation: Find more detailed usage instructions and API documentation in the API reference.
- Contribution Guidelines: Contributions are welcome! Feel free to submit bug reports, feature requests, or pull requests on the GitHub repository.
- Issue Tracking: If you encounter any issues or have questions about the package, please open an issue on the GitHub repository.
I strive to respond to issues and pull requests promptly. Your feedback and contributions are appreciated!