Flutter is blowing our minds
Having come from a Python, JS, web-based background, the past few months of working on a new Flutter project have required a bit of a mind shift to say the least. However, after a few hundred hours of getting to know Flutter, I’ve grown to love it, and the features are still blowing my mind!
Having worked with JS apps for years, hot reload was not a new concept to me; a file is saved, Gulp does its thing, and the browser reloads running the new compiled code - great. What is impressive though, thanks to Flutter’s stateful widget architecture, is that the state is preserved for free! Of course, there are some gotchas to this - The changed code only has an effect on the running of the app if the code is executed, and only code involved in rebuilding the widgets is automatically re-executed. Thankfully, this isn't too much of a problem with Flutter, due to the hot restart feature, allowing the app to be quickly restarted without having to wait for a full compile and deploy to the simulated device.
Automatic code formatting
How many times have you reviewed a pull request or dived into code only to spend a load of time fixing the style? Sure, we all try and follow a style guide, and it's easy to enforce aspects such as line length limits and spaces vs tabs (IMO spaces, always spaces!), but some things will always slip through the cracks. Whilst I’m sure you could set up some tooling to enforce the desired style, Flutter gives you this for free with its automatic code formatter. What's more, with the use of trailing commas, you can force the formatter to line break. No more, erroneous spaces or line breaks! Did I mention you get this for free?!
First and foremost, Flutter is a UI framework, and it does it well! The inbuilt widgets cover about 90% of anything you want to draw. Want to draw a button? No problem - there's a widget for that. Do you want your button in Material Design (Android-style) or Cupertino (iOS-style)? Flutter has you covered either way.
Layout widgets ease UI creation. Need a drop down? A menu bar? A list of cards? No problem - all covered! Want a text box in the centre of the parent? Easy - Just wrap the TextBox widget in the Centre widget. Job done.
Source code readability
There is nothing new under the Sun. Sure, there are novel ideas and new problems to solve, but someone somewhere has probably had a similar problem to yours. We are all standing on the shoulders of giants so why try to reinvent the wheel? (That’s 3 metaphors in 3 sentences!) Unlike other libraries/frameworks I've used, Flutter’s source code is incredibly readable. Unsure how the theme applies to a specific widget? No problem - Open up the source and have a quick scan. There is very little magic in there and everything has been very thoughtfully documented.
Flutter projects are compiled directly into native code and there is no bridge or interpreter to slow things down. On top of this, widgets aren't simple wrappers around native components, but instead, drawn directly onto a canvas using a super fast low-level C++ library. This means that 99% of apps won't have a problem with performance. To have performance stats like this with a WORE (write once, run everywhere) framework is phenomenal and was unheard of only a few years ago.
These are just some of the reasons we love Flutter. On the whole, Flutter allows us to build fast, and produce native apps with no compromise.
So what’s not to like?
Find out more about our apps here.