Transforming FlutterFire: The Official Firebase SDK for Flutter
How Google partnered with Invertase to make Firebase integration easy for Flutter developers.
7 min readBridging the Gap: Flutter and Firebase
Flutter and Firebase are a powerful combination for building cross-platform applications quickly.
- Flutter is Google's open source framework for building beautiful, natively compiled, multi-platform applications from a single codebase.
- Firebase is Google’s mobile and web app development platform that provides developers with backend services and tools to build applications quickly.
Connecting Firebase to Flutter wasn't always easy. This case study explores how Google teamed up with Invertase to transform FlutterFire – the official set of Firebase plugins for Flutter, into a robust and developer-friendly SDK.
Obstacles to Developer Productivity
Google first created FlutterFire plugins in 2017 as an unofficial way of helping Flutter developers to leverage Firebase services. Like most early-version software, FlutterFire faced plenty of challenges:
- Limited Support and Resources: As an unofficial project, FlutterFire lacked dedicated support, leading to slow issue response times, incomplete features, and outdated documentation.
- Cross-Platform Complexity: Supporting multiple platforms (Android, iOS, Web, Windows) while maintaining compatibility with evolving Flutter and Firebase SDKs added complexity.
- Incomplete Features and Inconsistent Behaviour: Some Firebase services lacked full functionality or behaved inconsistently across platforms.
- Manual Configuration: Flutter developers faced a time-consuming and error-prone process of manually downloading and configuring platform-specific files to integrate firebase into their applications.
- Increasing Demand: As Flutter's adoption grew, the demand for a robust FlutterFire integration outpaced the existing implementation's capabilities.
- Growing Developer Frustration: Developers faced roadblocks, delays, and limited support, leading to frustration and hindering productivity.
These challenges, coupled with the increasing popularity of Flutter and the demand for Firebase integration, underscored the need for an overhaul of FlutterFire.
Transforming the Developer Experience
By 2020, Google was committed to providing a first-class integration experience for Flutter developers and sought a partner with a deep understanding of both Firebase and Flutter to transform FlutterFire into a robust and reliable SDK.
With a proven track record in developing the React Native Firebase SDK we were excited to take on this challenge and apply our combined knowledge of Firebase and Flutter to create a more seamless developer experience.
We collaborated with Google to:
- Expand Platform Support: We brought comprehensive Firebase integration to all Flutter-compatible platforms, including Android, iOS, Web, and Windows. This involved developing and maintaining separate platform-specific plugins for each Firebase service, delivering consistent functionality and performance across all environments.
- Align APIs: We standardised FlutterFire's public APIs to match the native Firebase SDKs, making them consistent and familiar for developers already accustomed to Firebase. This streamlined the process of integrating Firebase services into Flutter applications.
- Refactor the codebase: We updated the FlutterFire codebase to leverage the latest Dart SDK, incorporating modern language features and best practices to improve performance, maintainability, and developer experience.
- Improve Quality Assurance: We enhanced stability by introducing a suite of automated tests, including unit tests, integration tests, and end-to-end tests. These tests run automatically on every commit and pull request, guaranteeing that code changes don't introduce regressions or break existing functionality.
- Enhance Documentation: We created a dedicated documentation website with clear, concise, and up-to-date guides, tutorials, and API references for each FlutterFire plugin. To make this information more accessible and discoverable, we migrated the documentation to the official Firebase documentation website.
- Automate Workflows: We implemented continuous integration and continuous delivery (CI/CD) pipelines using GitHub Actions to automate the build, test, and release processes. This ensured that code changes were automatically tested and deployed to pub.dev, the package repository for Dart and Flutter.
To further enhance FlutterFire and exceed both Google and Flutter developer’s expectations, we took the initiative to:
- Adopt a federated plugin architecture: We undertook a major architectural overhaul, migrating to a federated plugin structure. This helped to introduce modularity, platform-specific optimisations, and future compatibility.
- Develop a Dart mono-repo management tool: We created Melos, a tool to manage Dart and Flutter projects with multiple packages automating tasks and ensuring project consistency. This tool is now open-source and widely adopted by Dart developers in the Flutter community.
- Develop the FlutterFire CLI: We simplified Firebase configuration and integration by creating a dedicated command-line interface. This tool automated the process of adding Firebase to Flutter projects, generating necessary configuration files, and streamlining the setup process for developers.
This collaborative effort resulted in a robust, reliable, and developer-friendly FlutterFire SDK, effectively addressing the initial integration challenges. The addition of the FlutterFire CLI further streamlined the development process, empowering Flutter developers to seamlessly integrate Firebase services into their applications.
FlutterFire's Success
Our partnership with Google significantly improved FlutterFire, resulting in a range of positive outcomes:
- Official Firebase SDK: FlutterFire became an officially supported Firebase SDK, a significant breakthrough that marked a turning point in its maturity and adoption.
- Increased adoption: The FlutterFire GitHub repository gained over 8.7k stars, reflecting strong community interest and engagement.
- Enhanced stability: We achieved a 90% reduction in reported issues and implemented a fully automated CI/CD system with full test coverage. This significantly improved stability, increased developer confidence, and ensured higher code quality.
- Comprehensive platform support: FlutterFire now supports all Firebase services across all Flutter platforms, expanding the possibilities for developers building cross-platform applications.
- Improved developer experience: We streamlined configuration, enhanced documentation, and automated workflows, significantly improving developer efficiency and making Firebase integration seamless.
- Increased release velocity: Thanks to our automation systems and developer tooling like Melos, the combined suite of 50+ individual Flutter packages undergoes weekly releases, ensuring developers have continuous access to the latest features and bug fixes.
- Flutter Fire Festival (F3): Following the success of our collaboration, Google and Invertase partnered to host the Flutter Fire Festival (F3) in Prague. This event brought together 500 Flutter and Firebase developers, fostering community engagement and knowledge sharing within the ecosystem.
Partnering for SDK Development and Maintenance
The Google-Invertase partnership demonstrates the value of collaboration in open-source SDK development and maintenance. Invertase's expertise transformed FlutterFire into a robust and reliable SDK, improving the developer experience and evolving the Flutter ecosystem.
Need help attracting developers to your platform?
Speak to Invertase to see how we can enhance your developer experience through SDK Development and Maintenance.
Explore our SDK Development & Maintenance service
Talk to us about your needs