Closed
Description
My file looks approximately like this:
import 'package:angular/angular.dart';
import 'package:swlegion/catalog.dart';
import 'package:swlegion/holodeck.dart';
class Simulator {
static final _defendingWhiteSurgeTroopers = Defender.multipleUnits(
[
Units.$1dot4FDLaserCannonTeam,
Units.$74ZSpeederBikes,
],
const DefensePool(
dice: Dice
// ^^^^^^^
),
);
I wanted a suggestion of package:swlegion/holodeck.dart
, which includes a DefenseDice
class.
I hit CTRL-SPACE
, and got:
A few comments/requests:
- Can analyzer only suggest types that are valid, especially since Dart 2?
I was assigning to DefensePool.dice
, which reads:
/// What type of dice the defending units are using.
final DefenseDice dice;
... so I think it would be ideal to only suggest types that are valid assignments to DefenseDice
.
- Can analyzer do full-string matches instead of partial?
I typed dice
, assuming that it would auto-complete to DefenseDice
but instead got:
- Directive
- Uri.directory(...)
... etc. Maybe this makes sense up to say, 2 characters, but clearly by typing dice
I did not intend to write Uri.directory
. In fact, DefenseDice
does not show up at all in the list no matter what I type and try to complete, because it is not imported. But that's unfortunate, because it is one of my dependencies.