In case you missed it, Flutter, the new kid on the mobile development block, allows you to provide a sleek solution for both iOS and Android development platforms using the same source code. This “write once, run anywhere” approach made famous by Java makes app development a lot more efficient.
Backed by Google, Flutter allows you to write your code once in a new language called Dart. Running as both an engine and a framework, this ingenious platform introduces an alternative approach to the traditional web-first, JavaScript-first model. As a custom software development firm with solid experience in mobile app development, BBD knows that there are plenty of frameworks that try to allow you to leverage off of web skills and write traditional web code that then gets compiled (or transpiled) into something an app or hidden browser can render. “But by decoupling the underlying rendering engine on any particular platform, Flutter can provide a solution for each” explains Peter Scheffel, BBD’s chief digital officer. Currently, iOS and Android are supported, but web and later desktop will be built from the exact same source code.
Scheffel goes on to explain that Flutter provides a full development workflow with a hot reload capability and also focusses on making the final app experience the best it can be with extremely high framerates in 2D, constant 60 fps, and the ability to run on older devices starting with Android Jelly Bean (4.1) and iOS 8.
With Flutter 1.0 only having launched in early December 2018 and Flutter 1.5 launched on 7th May 2019, just before Google I.O, development and investment in this platform is moving forward at speed.
So how does Flutter differ from other frameworks?
Flutter takes responsibility for rendering its own version of the underlying operating system’s standard control and user interface (UI). While it supports Material Design, which by no coincidence happens to be the basis of Android, this does not imply that the Material Design for your app is Android.
“Flutter being built on Material Design is something that you need to get your head around when you start using the platform” says Scheffel. In the early days of mobile apps, it was important that your buttons looked precisely like the underlying OS as this is what gave it a native feel. “Of course it’s possible to build apps using the Material Design to give an Android look, or with the so-called ‘Cupertino’ library to provide an iOS look, but using Material Design gives you a whole design canvas on which to be creative”.
“I have come to learn over the years that the design language of your app should be as unique as the app itself. Just look at the leaders like Netflix and Airbnb who design their apps independently from the underlying platform they run on.” Every app should be designed to have its own unique design flair, hence why Material Design as the basis comes in handy.
Flutter is also all about widgets, and optimally manages the rendering of them to keep a high frame rate.
So why does Flutter use Dart as its development language?
Flutter uses Dart because it compiles ahead of time and as a strongly typed language, picks up many issues at compile time. But Dart can also be compiled just-in-time allowing for a rapid development workflow cycle. This enables you to hot reload, or visually see changes quickly, without losing state, while making changes in the app.
Mobile development has become more straightforward in the last couple of years, with there only being two dominant platforms: Android and iOS. Given the recent developments in the USA, with Huawei no longer being allowed to use Android, Scheffel believes that mobile platforms might diversify again soon to at least three mobile platforms, and that Flutter may therefore be a more strategic move by Google than we realise, to capture more of the development market. Either way, Flutter should be considered a serious player in the cross-platform development world.