Improve Flutter Skills by Studying Production-Level Applications
Tags: flutter, mobile, resources, learning
Published: 2021-10-22 07:11:23

There are many concepts to understand in mobile development. Among these are pagination in API requests, local storage, error reporting, debugging, testing, linting, and CI/CD.

Following is a list of some open-source Flutter projects that can be used to study and improve our skills. All of these projects offer some useful concepts we can learn from.

## Goal

We can learn from other people's code to understand and implement better code ourselves. This is where open-source projects come in. Using open-source projects is one of the best ways to improve our skills.  

> I look up to them personally. The list could have been much longer, but here I listed a few to get you started. 

Let's take a look.

---

### 1. [Photobooth](https://github.com/flutter/photobooth)

This is a web app. Flutter Web was made available on the stable channel this year. So Photo Booth is a great example of flutter web apps.  
Another thing to learn from this is the use of **native plugins** like cameras. There're also **firebase** packages like firebase authentication, firebase storage, etc.

The app shows how we can **internationalize** a flutter app, how to structure folders, and the use of **bloc** as state management.

To go one step ahead, there's also CI/CD to look at when working with the deployment part. This app has **GitHub workflows** for testing, analyzing lint rules, deploying the new app version, etc.

The main focus for me though is the **tests** folder. From mocking a library to test gestures, there are many test cases that we can learn from.

### 2. [Debugging Testing Publishing Flutter App](https://github.com/mhadaily/pluralsight-debugging-testing-publishing-flutter-app)

This app is a part of a [course](https://www.pluralsight.com/courses/debugging-testing-publishing-flutter-app). There are different branches for each topic.

As the name suggests, we can learn about error reporting, testing (unit, widget, and integration tests), and debugging.

### 3. [Marvel](https://github.com/rrousselGit/river_pod/tree/master/examples/marvel)

This is specifically for [riverpod](https://riverpod.dev/) package.  
This app shows how we can paginate API requests while scrolling, how to cancel a request, and cache the result.

### 4. [Movie App State Management Flutter](https://github.com/bizz84/movie_app_state_management_flutter)

This project is wonderful. It shows how we can structure our code with various **state management** packages.

In addition to pagination, there's **local data persistence** as well.

### 5. [Riverpod Tutorials](https://github.com/funwithflutter/riverpod_tutorials)

This project is specifically for [riverpod](https://riverpod.dev/) package.  
This is a ToDo application. The project starts simple with basic functionality and then progresses with new features. There is a different folder for each concept.  

This project first introduces various providers. Then it shows how we can use them to pass data in our UI. Next comes how to deal with asynchronous data with Riverpod. There's error handling and cache management as well.

### 6. [Flutter Templates](https://github.com/flutter/flutter/tree/master/examples)

These are the templates/examples from the Flutter team. From "hello world" to "flutter layer architecture" and "platform channel", there is a lot to cover.  
This is great for getting started.  

Additionally, there's another project with templates, [new_flutter_template](https://github.com/brianegan/new_flutter_template). This one is still in work in progress I believe. But there are a few samples to look at.

### 7. [Gallery](https://github.com/flutter/gallery)

This app shows a number of examples of different widgets. 
Besides that, the source code itself is a great example of how to deal with different themes, including font size and locale.  

In addition to learning how to build the UI, there are also tests, Github workflows, and linting to look at.

### 8. [Starter Architecture Flutter Firebase](https://github.com/bizz84/starter_architecture_flutter_firebase)

This project focuses on the architecture and folder structure of the source code.  
There is a lot of thought given to building a big-scale app codebase.

For state management and backend it's using Riverpod and firebase respectively. The common functionalities signing up, using firebase storage, dealing with APIs and streams, etc are converted with tests.

The other thing I appreciate about this project is the use of **linting**. Although now with the latest Flutter version, linting comes by default when we create a new app.  
Nonetheless, linting is always a good thing to implement in a project.

There are some features/widgets that we might use in more than one app like a fancy animating container. We can make this code reusable if we make a separate **package** for it and import it into the projects that require it.  
The author of this project does this for many UI components (widgets) and certain services like firebase auth. Now whenever the author has to use Firebase authentication, he can simply import the package and save time.  

From studying this project can learn how to create a customizable and independent feature or services into a package.

### 9. [SpaceX Go](https://github.com/jesusrp98/spacex-go)

This project seems to have it all. It handles API requests, caching images, managing notifications, localization, navigation, slivers, etc.

The beauty of this codebase is the code reusability. The project has a well-defined structure and uses [generic classes](https://dart.dev/guides/language/language-tour#generics).  
This project can also be used to learn how to create model classes. Other things to look out for are tests, linting, and Github workflows.

Overall, the code is beautifully written and the project is well structured.  

### 10. [Chicago](https://github.com/tvolkert/chicago)

Ever wanted to make your own widgets from scratch? By scratch here, I mean the [RenderObject](https://api.flutter.dev/flutter/rendering/RenderObject-class.html) itself.

There is rarely a need for someone to create your own render objects, but when the need arrives we can refer to this project to understand how to create them.  
There're also tests written for these widgets.

### 11. [Finished Flutter Firebase DDD Course](https://github.com/ResoCoder/finished-flutter-firebase-ddd-course)

With application architecture patterns in mind, the Domain-Driven Design pattern is one of the patterns we should be familiar with. This project follows the DDD architecture pattern and has tutorial series with both [articles](https://resocoder.com/category/tutorials/flutter/firebase-ddd) and [videos](https://www.youtube.com/watch?v=RMiN59x3uH0&list=PLB6lc7nQ1n4iS5p-IezFFgqP6YvAJy84U&ab_channel=ResoCoder) by the author.

Along with DDD, the author has another [application](https://github.com/ResoCoder/flutter-tdd-clean-architecture-course) and [tutorial series](https://resocoder.com/flutter-clean-architecture-tdd) for Clean Architecture + Test-Driven Development (TDD).

### 12. [Sqlite](https://github.com/dart-lang/sdk/tree/main/samples/ffi/sqlite)

To learn how to interact and write with the native interface (C APIs) in the dart, also known as [ffi](https://dart.dev/guides/libraries/c-interop), this project is a great example.  
As a bonus, there are tests as well.

### 13. [Flutter Tips and Tricks](https://github.com/vandadnp/flutter-tips-and-tricks)

This is not a flutter application but a repository with a collection of various flutter/dart code snippets.  
Nonetheless, the collection is amazing and a great learning tool. There are various small tricks for optimization and such as well.

---

## Final Note
Thank you for reading this article. If you enjoyed it, consider sharing it with other people.
If you find any mistakes, please let me know.
Feel free to share your opinions below.