0 purchases
unused import remover
Unused Import Remover (Dart) #
Abstraction #
When you or your team develop a huge project using Flutter or Dart, it sometimes happens that many Dart files have unused import and output warning messages by Dart Analysis.
If you feel it is annoying, use the unused_import_remover package, which helps you with such an annoying problem.
Features #
You can choose the directory in which you want to remove the unimportant package. you execute the below command.
dart pub run unused_import_remover
copied to clipboard
That's all!
After you have executed the command, unused_import_remover checks all dart files under the directory you selected recursively, finds unused import package -> remove!!
You can get the benefits. An example is written below.
Before
import 'dart:async';
import 'dart:cli';
import 'dart:collection';
class Test1{}
copied to clipboard
After
class Test1{}
copied to clipboard
Installation #
add unused_import_remover package in your project
dart pub add dev:unused_import_remover
copied to clipboard
Usage #
dart pub run unused_import_remover *DIRECTORY_PATH*
copied to clipboard
Additional information #
Ensure that you have to set DRECTORY_PATH, not FILE_PATH
Correct
dart pub run unused_import_remover ./
copied to clipboard
dart pub run unused_import_remover ./*DIRECTORY_NAME*/
copied to clipboard
You don't have to pub last /.
dart pub run unused_import_remover ./*DIRECTORY_NAME*
copied to clipboard
Incorrect
dart pub run unused_import_remover ./*.dart
copied to clipboard
dart pub run unused_import_remover ./*.dart
copied to clipboard
dart pub run unused_import_remover ./specific_file.dart
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.