-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
Closed
Copy link
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris bug
Milestone
Description
Describe the bug
When a library is imported with an alias (ex: import 'package:flutter/material.dart' as material;), the option "Remove widget" is not available on the widget from this library (ex: material.Center()).
To Reproduce
Steps to reproduce the behavior:
- Copy this code
import 'package:flutter/material.dart';
import 'package:flutter/material.dart' as material;
class MyWidget extends StatelessWidget {
const MyWidget({Key? key}) : super(key: key);
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return const Center(
child: material.Center(
child: Text('Flutter'),
),
);
}
}Or check out https://github.com/ValentinVignal/flutter_app_stable/tree/flutter-vscode/remove-widget.
2. Toggle the code actions on Center and then on material.Center.
3. Notice that the code action "Remove widget" is available for Center but not for material.Center.
Expected behavior
I expected to be able to remove Center and material.Center
Screenshots
On Center:
On material.Center:
Please complete the following information:
- Operating System and version: macOS Big Sur, version 11.6.8
- VS Code version: 1.71.2
- Dart extension version: v3.48.4, Flutter extension version: v3.48.0
- Dart/Flutter SDK version:
Flutter 3.3.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e3c29ec00c (8 days ago) • 2022-09-14 08:46:55 -0500
Engine • revision a4ff2c53d8
Tools • Dart 2.18.1 • DevTools 2.15.0
- Target device (if the issue relates to Flutter debugging): NA
Metadata
Metadata
Assignees
Labels
in editorRelates to code editing or language featuresRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serverSomething to be fixed in the Dart analysis serveris bug

