
When creating model classes, you'll often needs methods such as copyWith(), toString(), toJson(), fromJson(), toMap(), fromMap(), =, hashCode. Using the right extensions will save you a lot of time and give you superpowers. If you want to see them all and customise the key bindings, this is the one to use: Show all the keyboard shortcuts VSCode Extensions for Flutter Development If you want to take this further, you can install the Awesome Flutter Snippets extension, which offers many other useful snippets. To see all the available Dart snippets, check this file. These are great because they generate all the boilerplate code for you, and all you have left to do is to name your widget: Generated boilerplate for the "stanim" snippetīut you can also use snippets to generate common code blocks, such as if/else, for loops, function definitions, etc: Dart snippet to insert an if/else statement Generated if/else statement "stanim" snippet to insert a StatefulWidget with an AnimationController

You can use it to wrap, extract, remove widgets, etc: Quick Fix example: wrap a widget Use this anywhere in the editor to get a contextual list of code actions.

YouTube already has many excellent videos about VSCode shortcuts, and I'll link the best ones at the end.īut for now, here's a shortlist of my favourites: 1. Test and build for free today by clicking here. Glassfy’s Flutter SDK solves all the complexities and edge cases of in-app purchases and subscriptions so you don't have to. Help me keep it that way by checking out this sponsor:īuild and grow in-app purchases.
