We’ve just created a Flutter app!
Below you will find out how we dealt with this new framework and its lack of some functionalities.
In the beginning, I want to describe what our app is useful for.
It’s simply a remote controller for opening the parking gate on demand. E.g. if you use a replacement car, the sensors will not recognize you. So, you need to open the gate manually. To do so, we need information about the user’s subscription of parking lots and we also need to track his current location, to calculate if he is close enough. So, what about developing our first Flutter app?
When the project started, version v0.5.1 was available. One month later – v0.8.2. As you can see, it’s growing fast. Actually, there weren’t any huge changes and basically no refactor needed, but a few problems with the incompatibility of flutter plugins occurred. Occasionally, after the SDK upgrade, we had to spend time on updating plugin versions or even finding alternatives for them. But I’m pretty sure that after the v1.0 Flutter SDK release, most of these problems will disappear.
I’ve started with some research. Unfortunately, most of the plugins that should do the job as native Android and iOS apps don’t support all the features. E.g. you can forget about using the camera with a custom overlay without writing native modules. Fortunately, Flutter supports communication with native code through ‘MethodChannels’. So basically, if you have some knowledge of iOS and Android development, you can handle it easily. If you don’t, then things get more complicated.
Most of the time our app can perform in a stable 60fps. We only had a few problems with memory leaks that, as we found, were caused by repeating animations. We had to handle it another way to decrease the memory usage of the app.
TIME TO DEPLOY!
As an Android developer, I’ve made many ‘flavors’ in my Gradle configuration files. Flutter works really nice when it comes to building an Android apk file. Unluckily, we encountered many problems while trying to make it work with the Apple environment. We had to involve another iOS developer to handle it for us and… it’s still not a fully proper solution, but at least we succeeded in deploying the production version to AppStore :)
WORTH IT OR NOT?
Flutter is still in its beta phase, so there are many features missing that are available ‘out of the box’ for native development. As you can see, development with Flutter can be really annoying. Using beta versions of frameworks for production is always a risk, but still, if you want to make a small app for both platforms in a short time, Flutter is all that you need.