Thinking Out Loud

"Straight from the horse's mouth"
Luke Taylor Junior Software Developer

Experimenting with Flutter

Over the last couple of weeks, our development team has been working with Flutter; the UI kit built by Google as a competitor to Facebook’s React Native.

Google markets the framework as a portable UI toolkit for building beautiful, natively-compiled applications for mobile from a single codebase (with web and desktop coming soon).

We decided to test the framework by converting our Intranet, a React-based front-end with a .NET api layer, into a native app for iOS and Android. The main purpose of our intranet is to administer and book leave.

We found that there was a number of benefits to using Flutter;

  • It provides a quicker user experience than React Native. Flutter uses Dart, a low-level programming language that compiles directly to native machine code and reduces load times. 
  • We found Dart fairly simple to pick up, as it uses an Object Oriented structure, similar to what we currently work in, so we were able to get going pretty quickly without any massive obstacles.
  • Creating the native UI, including animations, is fairly painless as Flutter has built-in widgets that allow the apps to behave naturally on both iOS and Android (both material design and “cupertino” widgets). 
  • Dart makes it extremely easy to grab and use external packages, such as icon packs; this sped up the development time.

There are a couple of limitations though; 

  • React Native was launched in 2015, so there is a massive community behind it, meaning that there are plenty of existing packages available. Flutter was only officially released in December 2018, so the community is although still large, has had less time with the framework, meaning less existing packages (however https://pub.dev/ has a decently sized library of packages to use or scaffold off!).
  • ‘Flutter for web’ is still in development and not yet stable, meaning it can’t be used for web platforms yet.

Whilst we haven’t done enough investigation to run a direct comparison with React Native, we do anticipate that apps made with Flutter would be quicker to get to market, which could be important for PoCs or MVPs and influence it’s uptake moving forward. React Native uses bridge and native elements so often requires separate optimisation across each platform; a problem that doesn’t exist with Flutter.

Whilst still gaining traction, Flutter is already gaining popularity. In a survey run by Stack Overflow earlier this year, Flutter came third in the league table of “Most Loved Frameworks. React Native was eighth. It will be interesting to see where it sits in 2020.