flutter_profanity_filter 0.0.3 copy "flutter_profanity_filter: ^0.0.3" to clipboard
flutter_profanity_filter: ^0.0.3 copied to clipboard

A simple profanity filter for Dart and Flutter applications.

example/main.dart

// example/main.dart
import 'package:flutter_profanity_filter/profanity_filter.dart';

void main() {
  final filter = ProfanityFilter();

  // Check if a text contains profanity
  print(filter.hasProfanity('This is a fuck')); // true
  print(filter.hasProfanity('This is clean')); // false

  // Censor profanity in a text
  print(filter.censor('This is a fuck')); // 'This is a *******'
  print(filter.censor('This is clean')); // 'This is clean'
}
2
likes
150
points
44
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A simple profanity filter for Dart and Flutter applications.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_profanity_filter