Repository navigation
Dart Code Complete VS MacOS - produces - setState(() {});(() { }) #3006
Description
Hello,
Just started to notice that when I use the Dart Code Complete in Visual Studio for MacOS, for the setState, it is producing this:
setState(() {
});(() { })instead of :
setState((){
});This creates both a formatting and Code Errors in the app. Here is the outputs of Flutter Doctor.
Really not sure what is going here. Thanks for Any Help with this. Please let me know if you need me to gather any more logs or information surrounding this issue. Have not been able to find other errors similar to this. Thanks.
Added Screenshot for visual of the problem.

**Doctor - v output:
**
Darrell:taskmaster Tanner$ flutter doctor -v
[✓] Flutter (Channel master, 1.25.0-9.0.pre.20, on macOS 11.0.1 20B29 darwin-x64, locale en-US)
• Flutter version 1.25.0-9.0.pre.20 at /Users/Tanner/FlutterDev/Tools/flutter
• Framework revision 9d1d0cfeb5 (33 hours ago), 2020-12-10 12:43:04 -0800
• Engine revision 827aa5d073
• Dart version 2.12.0 (build 2.12.0-135.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/Tanner/Library/Android/sdk
• Platform android-29, build-tools 28.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.2, Build version 12B45b
• CocoaPods version 1.10.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] VS Code (version 1.51.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.17.0
[✓] Connected device (2 available)
• iphone2 (mobile) • A450EAF8-4123-4DCB-A636-1E29B3561D0F • ios •
com.apple.CoreSimulator.SimRuntime.iOS-14-2 (simulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 87.0.4280.88
• No issues found!
Darrell:taskmaster Tanner$
Activity
DanTup commentedon Dec 14, 2020
I think this is a repeat of #969 but in the LSP server.
[Analyzer] Prevent two sets of parens being inserted for setState() w…
DanTup commentedon Dec 17, 2020
Fixed in dart-lang/sdk@222f3dc.
Since the change is in the LSP server in the SDK, you'll only see the fix once using an SDK that includes that change (if you're usually using Flutter master, that probably won't be too long).