
With this setup I get super rapid feedback and my Flutter workflow is a breeze. I get the best of it by running my IDE and the Simulator side by side: I have mapped this to ⇧⌘F11: One more thing To hide them entirely, you can use Distraction Free Mode. What this does it collapse them to the side (while still keeping them accessible). Hiding them is just on shortcut away with ⇧⌘F12: IntelliJ has a lot of useful tool windows. Hide All Tool Windows & Distraction free mode
INTELLIJ CODE WITH ME ANDROID
Head over to the android folder, then ⌃ Click → Flutter → Open Project in Android Studio.: Or jump over to Android Studio to edit your Android project? Head over to the ios folder, then ⌃ Click → Flutter → Open Project in Xcode.:
INTELLIJ CODE WITH ME CODE
Finds all usages of a given method or class:Įver need to jump over to Xcode to edit your iOS code / settings?

This one is super useful in bigger projects or if you're new to a codebase. This is mapped to ⌥⌘← and ⌥⌘→ by default. For example to return to previous scope after clicking through a method definition. So it would be ⌥1 for Project, ⌥2 for Favorites and so on.

Each one of these can be selected directly. Press ⌃⇥ to show, then again ⌃⇥ to select the next tab or ⌃⇧⇥ to select the previous tab:Īlso note the tabs on the left. This is very useful to switch between recent files. I use this as a quick file switcher or to find symbols by name within my code. Handy shortcut to generate common class methods and members. Similar to the above, use this to quickly add methods that are not yet implemented in a class. IntelliJ will suggest all candidates - choose one and hit Enter. Just start typing the name of the method to be overriden / implemented: Just hit ⌥⏎:Īs your code evolves, you may find that it has unused imports:Ĭlearing them away is just one shorcut away with ⌃⌥O or Code → Optimize Imports. I use this all the time - especially when I forget to make things private.Ĭreating a new widget? You can quickly import the required library without adding the import manually. Select a widget in your widget tree, then: ⌥⏎ Super useful to decompose nested widget trees. ⌃ Click → Refactor → Extract → Method.Select a block of code (make sure the parentheses are balanced), then: You can use this in combination with Extract to Method. No need to use your trackpad to select a code block.

Most stock widgets in Flutter have a lot of optional parameters, so keeping them in separate lines can be a big win.

Omitting the comma on the last parameter will keep the code inline: How does it work? Say your indentation is a bit messy, like this:Īutomated and consistent formatting is just one shortcut away.Īdding a comma on the last parameter will format the code across multiple lines: Made changes to a source file and want to reformat code? This list is a combination of generic and Flutter-specific shortcuts that I use in my workflow.
INTELLIJ CODE WITH ME PDF
You can see the default keymaps by selecting Help → Keymap Reference, which links to this handy PDF reference. IntelliJ IDEA is extremely configurable and I use as my IDE of choice for Flutter development. Pieces is the fastest way to boost your productivity and stay in flow. Save useful snippets straight from your IDE or browser. Help me keep it that way by checking out this sponsor:
