question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import quick-fix doesn't obey import order

See original GitHub issue

I used the import quickfix Import library 'package:flutter/services.dart', which resulted in the following analyzer warning:

info: Place 'package:' imports before relative imports. (directives_ordering at [flutter] lib/src/widgets/gesture_detector.dart:11)

Import section after quick-fix:

import 'package:flutter/foundation.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/rendering.dart';

import 'basic.dart';
import 'framework.dart';
import 'package:flutter/services.dart';

Would be nice if the import quickfix would add the import at the right position to not trigger an analyzer warning.

(not super-high priority, but nice-to-have )

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

github_iconTop Results From Across the Web

Visual Studio Code - Auto Imports / Quick Fix does not work
The bottom line - in order it to work correctly at the moment you still need to import (by hand) a new dependency...
Read more >
auto-import with alphabetized order by default #33839 - GitHub
This issue should cover inserting imports in the right order for : Auto imports; Add missing import quick fix; The add all missing...
Read more >
How to Automatically Organize Imports in VSCode - YouTube
Learn how to organize your imports when you save a file in VSCode----If you like cooking, checkout my side project: ...
Read more >
Code Syntax Style: Namespace Imports - JetBrains Rider
If an import is missing, your code does not compile, if there are unused imports, they could make maintaining your code difficult over...
Read more >
Importing into the United States A Guide for Commercial ...
Imported goods are not legally entered until after the shipment has arrived ... Foreign corporations may comply with CBP regulations by executing a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found