Flutter First Impressions
We’ve built quite a few native mobile apps at 3Advance, both iOS and Android. These applications vary in complexity, from simple content-consumption apps to complex real-time fantasy sports games. All our applications have back-end interactions, and they often offer a user experience that hides the complexity required under the hood.
In pursuit of being more efficient and providing greater value to our clients, we like to keep our eye on developments that might help us toward that end. We’ve tried a few cross-platform solutions and have found them lacking enough that we always return to native app development. A relatively recent entrant in this category is Flutter from Google. Flutter promises to deliver native iOS and Android apps using Dart as the backing language.
I decided to spend a few hours to see if Flutter is something we should consider at 3Advance. I’ve been doing Android development for five years and back-end server development for over twenty. I’ve also dabbled a bit with iOS app development, and I am very familiar from pull requests with how iOS apps are structured. I also enjoy learning new tool sets, so I thought I would see how Flutter stacks up.
Documentation and Tools
The flutter.io site is well designed and it was easy to get started. I had a working environment up and running (using Visual Studio Code) in about ten minutes. I chose Visual Studio Code as a development environment because I didn’t want to mess with my “real” environment (Android Studio), and the Flutter team treats it as a first-class option for development. The Flutter plugin was easy to install and worked as advertised.
After following the simple tutorial, I had my first Flutter native application running on an iOS simulator and the Android emulator quickly enough. Using the provided material design and cupertino icons, each platform looked like it was made for the Android and iOS environment respectively. The experience was good enough to think this might be worth really pursuing.
First Impressions
Flutter is impressive. I had a working app on both platforms about twenty minutes after first starting to install the environment. Additionally, the hot reload is amazing. Change your UI and it’s on the screen almost immediately. It’s much faster than anything I’ve experienced on native Android or iOS development, even with Android’s “apply changes” option.
I was also pleased to see how much of a community already exists for building Flutter applications. Most questions I could answer with a quick Stack Overflow search. There is also a wealth of provided packages both from the Flutter team and from community members.
Something “Real”
After the initial experience, I decided to try something a bit more “real-world.” A lot of applications have to authenticate to a back-end and then get information about the logged in user. I wanted to create a simple login and try to implement some of the common patterns we use when build iOS and Android apps, such as dependency injection, multiple build types (or flavors), and continuous integration.
I do not know Dart as a language, but I was able to use Swagger Codegen to generate a working Dart client for one of our APIs. The generated code got me started on making http API calls as well as model generation. I was able to build a simple splash page, login view with phone number, and one-time use code using our standard OAuth flow.
Creating the UI took a bit of figuring out while devouring sample code, but I was able to get a working UI that matched the native apps we built. There were a few small things I was not able to do, such as using a mask for phone number entry, controlling the IME action on the soft keyboard, and rounding button corners, but these are probably more my lack of experience than real Flutter limitations.
I had less success with dependency injection. After trying a couple of provided libraries unsuccessfully, I ended up copying the dependency injection methodology shown in a Flutter sample project. It works but feels much less fleshed out than what I’m used to using in Android.
I ran out of time before trying to create different build types or setting up continuous integration. Seeing that everything is possible via command line commands, I am confident both of these requirements are possible but would take some time to work out.
Conclusions
I liked Flutter, a lot. It feels similar enough to native Android development that I was able to create a working application in just a few hours. I like the use of widgets to build the UI and was able to achieve the desired UI quickly. With my limited testing of Flutter I don’t have any major reservations about the platform. It appears to be capable of building beautiful, useful applications across iOS and Android.
I’ve listed a few pros and cons for the team in considering Flutter as our native development platform. Most of the cons are more organizationally oriented, which is a major factor in making any decision like changing platforms.
Pros:
- Single set of code for iOS and Android applications.
- Very rapid development cycles. Hot swapping is fast and well done.
- Produces native applications that look and behave like they belong on their respective platforms.
Cons:
- As an organization we would have a learning curve to become proficient with Flutter/Dart.
- Although Flutter says it is production ready, it is not a full production release as of this writing (June 2018).
- Risk of shifting to a new platform with unknown gotchas.
I don’t think we’ll be making our next application here at 3Advance using Flutter, but I plan to keep working with it and perhaps using it in a production application isn’t too far away.
3Advance is an app development company in Washington DC that helps startups, non-profits, and other businesses turn great ideas into beautiful, simple mobile and desktop apps. If you’d like to learn more about how we can help you create a better way forward for your company, drop us a line. We’d love to hear from you.
It takes a village team.
Schedule a chat with yours.
Or sign-up for our weekly newsletter, What’s ‘Appening