Tips: 5 tips to Learn Flutter Like a Pro

Video version here

I've been teaching Flutter for four years now. I'm still having a blast.

During this time, I've mentored a healthy amount of students. I'll get emails, comments on my YouTube channel videos, Twitter DMs (@seenickcode) or messages on my Discord server.

There's one recurring pattern I've noticed. Students complain that they are taking months to learn the basics of Flutter and, moreover, they have not event attempted to build anything themselves yet. They complain they are stuck in tutorial hell, a term which we hear all too often.

So now that it's the new year, I've decided to get some thoughts down and list out five tips for newcomers to Flutter. If I were to start over myself and take this advice, I probably would have saved a lot of time. For the folks out there that are interested in freelancing, getting an internship or a new position as a Flutter developer, these may help you all save some time.

Before we start with tip number one, if you don't know me already, my name's Nick and I teach Flutter. My goal is to take the 20 years of experience I have as a software engineer, 10 years of it in the mobile space, working with startups and Fortune 500 companies alike and share some of my advice. Check out my website fluttercrashcourse.com where I've posted a number of free Flutter courses.

So now let's get to tip #1...

Tip #1: learning is done most effectively as a "multiplayer game", not a "single player campaign".

First off, make sure you've set up a public GitHub repository with some simple code you may be working on, even if it's something you're toying around with. Next, add README.md file with a list of what you're looking to build or learn.

Now, the next time you're seeking help, setting this up early will make it easy to share what you're working on with others. When you end up having a problem with whatever code you're working on, the code will already be easily shareable. This is very important because the classic mistake junior engineers make is they copy and paste their code in email or a DM. Doing this will greatly increase the chances your question will be ignored. This is also going to let you share your work and start discussoins with others. Either post what you're working on or a question you may have to whatever social network you use.

Additionally, what this GitHub repository does is open the door to starting a conversation and connecting with others in the community. Check out the Flutter Community page for a list of ideas on how to connect with others https://flutter.dev/community. If you'd like, you can email me your question directly at nick@fluttercrashcourse.com.

Overall, you will be amazed by the advice and help of others in the Flutter community and will get a fresh perspective on what you're working on. Most importantly, if you're spending more than a day troubleshooting something, maybe someone will point you in the right direction, saving you significant time.

Tip #2: stop learning what the best "State Management" package is.

Online communities are echo chambers, and sadly, they tend to perpetuate problems that are unnecessarily exaggerated. Newcomers will notice others looking at the same topic and think they also need to add this to their learning goals. I am personally considering a "state management package" is a package that makes it easy to pass around data across a widget tree. Fellow Flutter dev and ex-Googler Matt Carroll explains this nicely here (https://medium.com/super-declarative/understanding-state-management-and-why-you-never-will-dd84b624d0e, YT channel here https://www.youtube.com/c/SuperDeclarative/videos).

If you're building a simple app, especially if you're a newcomer to Flutter, I can guarantee that 90% of the time, you will not need a "state management" package. Most real world mobile apps are often powered by a backend that will maintain state already. A small fraction of apps out there will require some kind of local state, such as a database running on the device. Other than that, unless you have a very complex UI and you want to share this state between widgets and render updates reactively, most likely you will simply get by relying on fetching data from a backend when it's needed.

Another reason to avoid "state management packages" is that, as a more or less universal truth in software engineering, the two most difficult things are naming things and caching (i.e. "state"). So it's best to make your mobile codebase as dead simple as possible because if you have a bug in your app, resubmitting a fix is time consuming. Most modern apps have a web component as well, and you'll want to push most of that complexity to a backend any way.

Now with that said, if you need to pass around state easily and avoid some network calls, you can either use InheritedWidget, which is baked into Flutter or, if you really want to simplify working with that, the Provider package is something I have used. Apart from that, forget it until you really have the need.

Tip #3: finding the "best Flutter architecture", the "best code organization pattern" or "the best x" will waste your time.

Asking this is a tell-tale sign of a junior engineer. In the engineering world, there is no such thing as "best" of anything. There are always tradeoffs, pros and cons and the context of the problem at hand will dictate the right solution. I'll give you an example: is there a "best architecture" to engineer an earthquake proof skyscraper? Nope, there are pros and cons, opions various architects will have, budget, time requirements, team skill level building the structure, expertise a team is already specialized in in building skyscrapers and availability of material. I guess you can apply this to any engineering challenge - there are always tradeoffs for taking a particular approach.

In the case of Flutteer "architecture", if you're starting out, you can save yourself a lot of time and forget this. Focus on building something first, improve it, re-write it, get opinions from others and write more apps. Learn by doing, learn best practices along the way and figure out what's best for you. Post your code, get feedback from others more experienced than you. That's leads me to my next tip, actually.

Instead, strive to learn best practices. Ask around, post on Stack Overview, post your code and ask folks in the community, etc.

Tip #4: if you're a newcomer to mobile development and Flutter, focus on widgets and skills you need, avoid skills you may not need any time soon.

So what will you "need" to learn? First off, in my opinion, in terms of setting a goal, for a mobile app at least, if you can code an app that presents a simple scrollable list of text and images, with the ability to tap on an item and show a "detail" screen (the classic "main, detail" formula we see in most apps) with some basic layout, you should be off to a great start. If you want to get more advanced, I'd then go for learning how to fetch data from a URL to populate your app.

Try stuff out on https://dartpad.dev/flutter first even before installing Flutter on your machine. It's a great way to list some of the useful widgets you may want to get familiar with such as ListView, Text, Image, Navigator, Column, etc.

Focus on practical skills first.

Tip #5: Flutter is only one of many skills you will need if you want a career in mobile or cross platform development.

If you're an intern, freelancer or junior engineer, indeed you may be able to "get by" by sticking to UI only development. But in my experience, hiring managers and clients will need you to understand at least a bit of full stack development. At least how to integrate with a backend, how to report logs or crashes to a remote service, push notifications, CICD, etc. Ideally, if you are minimally competent in full stack mobile development, you'll not only be more marketable but will be able to have more fun developing the apps you enjoy. Most apps out there will have some kind of backend component by the way.

So what should you do? Avoid going overboard on advanced UI development (unless it's something you really really love, then, that's great) and balance it out a bit with understanding how to fetch data from a remote URL, how to submit data, how to distribute your app and make high quality assets like app icons, etc, how to optimize your app by caching large assets like images in a CDN, etc.

If you want more advice, feel free to email me at nick@fluttercrashcourse.com with your goals and I will be able to recommend a learning path that you can consider.

At the end of the day, Flutter is part of an ecosystem, like any other framework out there. Learn the tools you'll need to build a realistic, production ready apps. Take things with a grain of salt when course creators or other YouTubers out there pitch. Create a list of goals and focus on a simple app idea then work backwards in listing out the skills you may need to accomplish that goal. Use your own judgement.

My content will be focused on more full stack mobile development, so if you find what I am writing helpful, keep in touch and reach out with your questions. I answer everyone!

Happy Fluttering, Nick