Flutter-intellij: Import quick-fix doesn't obey import order

Created on 22 Jun 2017  路  8Comments  路  Source: flutter/flutter-intellij

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 )

dart plugin enhancement topic-editing

All 8 comments

@scheglov : I thought we did this already... Or?

Yes, I'm pretty sure we already put newly imported libraries at correct positions.
If it does not work, I would need maybe a bit more specific test case.

Hmmmm. Confirmed that this does NOT appear to be working as expected.

jun-26-2017 09-21-55

Perhaps a regression somewhere?

cc @alexander-doroshko @jwren

@scheglov : if the gif doesn't provide enough context, I can demo in person...

OK, thanks, I can reproduce the problem.

Thank you!

Was this page helpful?
0 / 5 - 0 ratings