print_cleaner 1.0.0 copy "print_cleaner: ^1.0.0" to clipboard
print_cleaner: ^1.0.0 copied to clipboard

A simple Dart CLI tool to replace all `print` statements with `debugPrint`

Print Cleaner #

A simple Dart CLI tool to replace all print statements with debugPrint in your Flutter project files.

Features #

  • Replace print statements with debugPrint
  • Support for recursive search in directories

Installation #

To use the tool, simply add it as a dependency in your pubspec.yaml file.

  1. Open your pubspec.yaml file and add print_cleaner as a dependency under dev_dependencies (since it's a development tool):
dev_dependencies:
  print_cleaner: ^1.0.0  # You can specify the latest version here
  1. Run flutter pub get to install the dependency.
flutter pub get

Usage #

Once you've added the library to your project, you can run the command directly from the terminal.

The tool will be available globally within your project. To replace print statements with debugPrint, run the following command:

dart run print_cleaner

This will run the tool on the current project directory and replace all print statements with debugPrint in all the .dart files recursively.

2
likes
130
points
140
downloads

Publisher

unverified uploader

Weekly Downloads

A simple Dart CLI tool to replace all `print` statements with `debugPrint`

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on print_cleaner