Open
Description
Hi! I'm a heavy user of keyboard shortcuts when I work in Android Studio, but for flutter code this is somewhat lacking imo. When I preform the procedure below, I would almost always change the "var" to "final" because it's usually more useful. What I would prefer is that this action produces a final, but there could also be an alternative action for final.
Other than that there's a lot of useful actions, many of them can be found in Settings->Keymap under Main Menu-->Refactor-->Extract/Introduce. The below mentioned action is called Introduce Variable, but other useful ones are Introduce Field, Extract Method et al. It would be really cool if these were supported when coding flutter.
Great work people! Loving flutter!
Steps to Reproduce
- Be in a function scope.
- type
123.toString();
- place the caret somewhere within
toString()
- Either
- press ctrl+alt+v
- alt+Enter and choose "Assign value to new local variable"
- Line turns into
var string = 123.toString();
Version info
[√] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.19044.1889], locale en-SE)
• Flutter version 3.0.3 at E:\Development\sdks\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 676cefaaff (3 months ago), 2022-06-22 11:34:49 -0700
• Engine revision ffe7b86a1e
• Dart version 2.17.5
• DevTools version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
• Android SDK at E:\Development\Android\Sdk
• Platform android-31, build-tools 33.0.0-rc4
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
[√] IntelliJ IDEA Community Edition (version 2021.2)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.2
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code, 64-bit edition (version 1.62.0-insider)
• VS Code at C:\Program Files\Microsoft VS Code Insiders
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (3 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1889]
• Chrome (web) • chrome • web-javascript • Google Chrome 105.0.5195.102
• Edge (web) • edge • web-javascript • Microsoft Edge 105.0.1343.27
! Device emulator-5556 is offline.
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.