Enhance Your Flutter Skills with These Open Source Projects
Written on
Introduction
Engaging with code written by other developers can significantly elevate your programming skills. This curated selection aims to assist you in advancing your expertise in Flutter.
Chapter 1: Overview of Open Source Projects
Having previously written about "4 Flutter Open Source Projects from Which You Can Learn a Lot!" (2023), I found immense value in my research, and many readers enjoyed it as well. Today, I'm excited to present additional projects I recently discovered. Regardless of your programming proficiency, there’s always something to learn from examining external code. Open-source initiatives provide a window into effective practices, allowing developers to refine their skills.
For each project, I've shared my insights, including aspects I appreciated and suggestions for improvement. Please feel free to share your thoughts; constructive feedback is always welcome. The contribution of open-source projects is invaluable to the community, and I appreciate the efforts behind them. Let’s dive into the code!
Section 1.1: Flutter Gallery - A Comprehensive Overview
Creator: Google
Stars: 5.6k (August 2023)
State Management: Provider
Key Features: Firebase integration, URL launching, animations
Flutter Gallery serves as a comprehensive showcase of Flutter's capabilities. You can either clone the repository or download the app from the Google Play Store. Within the application, you'll find demonstrations of fundamental widgets and animations, such as an iOS-style activity indicator. What’s particularly beneficial is that resources and source code are directly accessible.
Additionally, the gallery features six mini-apps, including an email app, retail app, personal finance tracker, travel app, news app, and a responsive starter layout. If you're interested in developing your own email application, the GitHub repository provides a substantial head start, particularly in state management using the Provider package.
However, I noticed that the file organization could be improved. For instance, the email app (Reply) contains 12 files in a single folder that could benefit from better categorization. This lack of structure is unexpected, considering its association with Google. Furthermore, some files, like "app.dart" in the email app, are excessively lengthy, encompassing 357 lines. It would be more efficient to separate the "_buildXtheme" functions into distinct files.
Nonetheless, this resource is a fantastic starting point for grasping the basics of Flutter and exploring user-friendly features like animations.
Important Links:
- Flutter Gallery (App link Play Store, Google)
- Flutter Gallery (GitHub, Google)
Section 1.2: I/O Pinball - Learn While Playing
Creator: Google and VeryGoodVentures
Stars: 2k (August 2023)
State Management: Bloc
Key Features: Firebase integration, translations, automated testing
As a fan of VeryGoodVentures, I previously recommended two of their open-source projects. Their work consistently exemplifies high quality and sets benchmarks in Flutter and Dart development, notably with dart_frog for backend solutions and their alchemist package for golden testing in Flutter. This game was developed in partnership with Google for the Google I/O 2022 event. Although it’s a game, there’s much for developers to learn.
One noteworthy aspect is their approach to translations. If you haven't implemented this feature in your apps yet, their use of generated l10n files is a great reference, as endorsed by the Flutter team. They utilize the bloc library for state management, making it an excellent example for newcomers.
VeryGoodVentures aims for 100% code coverage in their projects. While this may not always be necessary, there’s a lot to glean about automated testing from their practices. Their test folder illustrates how to write unit tests and utilize the mocktail package effectively.
I appreciated their structured architecture, which organizes features into separate folders, keeping visual elements distinct from game logic. This organization simplifies updates and modifications.
Important Links:
- I/O Pinball (Game, Google and VeryGoodVentures)
- I/O Pinball (GitHub, Google and VeryGoodVentures)
- I/O Pinball Powered by Flutter and Firebase (Medium article, VeryGoodVentures)
Chapter 2: Pokedex - A Project to Explore Animations
Creator: Hung Pham Sy
Stars: 2k (August 2023)
State Management: Bloc
Key Features: Hive, Dio, animations
The Flutter Pokedex is a personal project by Hung Pham Sy, and I’m particularly fond of its design and animations, which provide a premium user experience. The project showcases how to effectively incorporate animations—something I often overlook in my own apps. An example includes a visually appealing Pokeball in the background, implemented using a RotationTransition, which is quite straightforward.
However, I noted inconsistency in the configs folder. The durations.dart file contains a single top-level constant, while the constants.dart file has a constant wrapped in a class. I recommend simplifying this by removing the class and using top-level constants, as advised by the effective Dart guidelines.
The Flutter Pokedex utilizes Hive for data storage. While Hive is suitable for most applications, Simon Choi, Hive's creator, suggests his newer project, Isar, which is a Rust-based rewrite of Hive 2.0. Although I wouldn’t advise switching existing applications from Hive to Isar, I recommend considering Isar for new projects.
Overall, this project serves as an excellent resource for learning about animations and enhancing your Flutter skills.
Important Links:
- Flutter Pokedex (GitHub Repository, Hung Pham Sy)
Conclusion
Do you have your own open-source project? I encourage you to share it in the comments. Also, let me know if there’s a topic you’d like me to explore in my next article. Your feedback is invaluable!
If you found this article helpful, please interact with it through claps, highlights, comments, and shares. Engagement is particularly important for technical articles under the new Medium Partner Program. For more details on this issue, check out: The New Medium Partner Program is Bad for Quality Writing!