Colons in named parameters get replaced with equal signs occasioanally
See original GitHub issueWhile editing code, the editor sometimes brakes previously valid code below the code being edited by replacing colons in parameter lists with equal signs. The editor also adds curly braces { … } automatically when it should not (there should not be curly braces in a conditional statement inside an array definition).
Sample result (the code defines widgets inside Column.children
):
I don’t know how to reproduce this exactly, but most probably you have to make some heavy editing into an initially valid code which brakes the code on purpose temporarily. Then you will see also some unexpected automatic “fixes”. In this specific case I just copy/pasted a block of new code into the middle of an existing code and started editing it. This was expected to brake the existing code temporarily, but braking the parameter lists and adding invalid curly braces is of course not correct.
[√] Flutter (Channel stable, 2.10.4, on Microsoft Windows [Version 10.0.19043.1586], locale en-US) [√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.7) [√] Android Studio (version 2021.1) [√] VS Code (version 1.66.0) [√] Connected device (4 available) [√] HTTP Host Availability
Dart extension v3.36.0
Issue Analytics
- State:
- Created a year ago
- Comments:13 (6 by maintainers)
Top GitHub Comments
@DanTup Ok, I’ll try to do it next time I see it. I’m working on a variety of projects and I’ve only been able to use Dart occasionally lately, but nonetheless, I’ve seen the problem a few times in the last few months.
This issue has been marked stale because it is tagged awaiting-info for 20 days with no activity. Remove the stale label or comment to prevent the issue being closed in 10 days.