import_path_converter
1.0.1, released 5 years ago by ymgn9314.com
Automatically convert relative and absolute import paths in Dart files.
$ flutter pub add import_path_converterWhat it does
It scans your lib, bin, test, and tests folders to automatically convert relative imports to absolute package imports (or vice versa). You can run it via the command line or configure it in your pubspec.yaml file.
AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want a consistent import path style across your Dart and Flutter codebase.
- You want to enforce import formatting rules in a CI pipeline using --exit-if-changed.
Skip it when
- You prefer manual control over every import path without automated formatting.
- Your project relies on tooling that conflicts with automated path conversion.
Strengths
- Supports command-line execution and CI integration with flags like --exit-if-changed.
- Configurable through pubspec.yaml to ignore specific files or toggle relative paths.
Weaknesses
- Limited documentation regarding advanced custom configurations beyond the provided examples.
- Relies on external regex or command-line filtering for granular control.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Add the package as a dev dependency using `flutter pub add --dev import_path_converter` and run via `flutter pub run import_path_converter:main`.
flutter pub run import_path_converter:mainAlternatives
Packages that do the same job and could replace import_path_converter.
- import_sorter
Automatically sorts Dart imports alphabetically and groups them by type
50Compare - hotreloader
Automatic hot code reloader for Dart projects that applies file changes to the running process.
70Compare - print_remover
Tool to remove all print() and debugPrint() statements from Dart files
51Compare - android_sms_retriever
Flutter plugin to automatically retrieve OTP SMS on Android without SMS permission
45Compare
Works with
Packages commonly used together with import_path_converter: ones it builds on, ones built on it, and its own family.
- yamlimport_path_converter depends on itA Dart library for parsing YAML documents into Dart data structures.
- argsimport_path_converter depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- tintimport_path_converter depends on itTerminal string styling as an extension on String.