Convert project imports to relative imports
Closes #59
- Add conversion of project imports to relative imports for lib files.
- Add test for convertToRelativeImports
Question:
The example app has the following import but no corresponding dependency
import 'package:flutter_gen/gen_l10n/translations.dart';
Hello @gupta-shrinath. Thank you so much for sending in this PR but I am sadly archiving import_sorter (see #63). This means that your work will not be merged into import_sorter. Thank you so much for the effort in trying to improve the project.
While I think this feature is useful, it is in my opinion out of the scope of import_sorter.
The sole responsibility of this package should be to sort imports, not update them.
@gupta-shrinath would you instead be interested in creating a separate package for this?
I see that someone else already tried to create a solution for this:
- https://www.reddit.com/r/FlutterDev/comments/gvj6eu/cli_tool_to_change_package_imports_to_relative/
- https://pub.dev/packages/drtimport
Thank you @gleich for the package and I understand your situation and I agree with making someone the maintainer as it is a good decision in spirit of open source. Hey @vkammerer thank you for appreciating efforts. I think this feature could be added to this package as the code is heavily dependent on existing code. Regarding making a new package for this feature I think is not worth because as you said there is already a package / tool available.