icon_cleaner 1.0.5
icon_cleaner: ^1.0.5 copied to clipboard
Removes emoji characters from Flutter Dart files.
๐งน icon_cleaner #
A Dart CLI tool to automatically remove emoji characters (โ โ
๐งน and all non-ASCII symbols) from your Flutter .dart files.
When you copy code from ChatGPT responses, it often includes emoji characters in print(), log(), and Text() calls that cause issues with App Store submissions and code reviews. This tool removes them automatically in one command.
๐ฆ Install #
dart pub global activate icon_cleaner
๐ Usage #
Basic โ clean your lib folder #
icon_cleaner --path lib/
Preview first (dry run โ no changes made) #
icon_cleaner --path lib/ --dry-run
Full options #
icon_cleaner --help
๐ฏ What It Removes #
All non-ASCII emoji characters from .dart files, for example:
| Before | After |
|---|---|
print('โ Error occurred') |
print(' Error occurred') |
print('โ
Success') |
print(' Success') |
log('๐งน Cleaning done') |
log(' Cleaning done') |
Text('๐ Results') |
Text(' Results') |
๐ Example Output #
icon_cleaner --path lib/
Files scanned : 24
Files cleaned : 6
Done! All emoji characters removed successfully.
๐ง Programmatic Usage #
Use as a library in your own Dart code:
import 'package:icon_cleaner/icon_cleaner.dart';
void main() {
// Remove emojis from a single string
final clean = stripEmojis('Hello โ World โ
');
print(clean); // Hello World
// Clean a single file
cleanFile('lib/screens/chat_screen.dart');
// Clean entire directory
cleanDirectory('lib/');
}
๐ License #
MIT License