fluttercommunity / fluttercommunity/import_sorter

Feature Request: Add option for relative import

Open
#59 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
183
Forks
42
PR merge metrics
No merged PRs in 30d

Description

It would be great if this package can change our absolute imports to relative imports.

Example 1
`import 'package:my_app/lib/src/foo.dart'`
to
`import 'foo.dart'`

Example 2
```
import 'package:my_app/lib/src/p1/foo.dart'
import 'package:my_app/lib/src/p2/foo.dart'
```
to
```
import 'p1/foo.dart'
import 'p2/foo.dart'
```
**if imported in `src`**
to
```
import '../p1/foo.dart'
import 'foo.dart'
```
**if imported in `p2`**

I would like to contribute to this feature but can anyone guide me with this?

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue names no files, tests, or entry points. Start by locating the package's import conversion logic and existing option tests, then clarify how relative paths and the requested option should be represented. Done means the examples are transformed correctly from each importing directory and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.