-
Notifications
You must be signed in to change notification settings - Fork 340
Closed
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 bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available
Milestone
Description
Reproduce
- Turn on the fix all option when saving in VSCode.
- Create the
main.dartfile andsub.dartfile using dart’spart&part ofsyntax as follows.- main.dart
import 'package:flutter/material.dart'; part 'sub.dart'; void main() { runApp(const Sub()); }
- sub.dart
part of 'main.dart'; class Sub extends StatelessWidget { const Sub({super.key}); @override Widget build(BuildContext context) { return Column( children: [ SizedBox(), /// 👈 Use 'const' with the constructor to improve performance. ], ); } }
- Even if you save in the
sub.dartfile, fix all does not work, soconstis not added beforeSizedBox(). - If you save in the
main.dartfile, fix all will work in the sub.dart file.
Expected
I think even if saved in the sub.dart file, const must be added in front of SizedBox().
Video
2023-10-25.1.09.45.mov
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 bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become availableSomething that requires changes in the Dart/Flutter SDK to ship before it will become available