Since Flutter is a rather young technology, it functions very efficiently. However, sometimes it’s challenging to find the right solutions, and occasionally we have to work with volatile versions of libraries.
1. Changing the app’s server
During development and testing, we used several versions of the server and Firebase (production, stage, development). One of the tasks was to make the server change from the application for easier testing.
The trick: even though the Firebase library itself supports this switching, some of the libraries that Firebase uses only work in default.
Our solution: we made the forks of these libraries on the Github and made PR with changes that would allow the use of default within Firebase.
2. Real-time data updates
Our solution: to use Firebase
The app uses Firebase as a data store, meaning that the app sends a request to the server to change or add data, and the server saves them in its database and duplicates them in Firebase. This allows you to use the real-time data updating functionality in the default Firebase libraries.
If users change something through the web interface, the changes are visible at API at the same time without additional server requests. The same goes if two mobile queues are used, or if data is changed by the administrator.