Why use Flutter for Mobile dev?

Developing a mobile app for both iOS and Android platform

At Intersec, we recently launched our new alerting product, Trela. With this product, mayors can alert and communicate local information to their subscribers. And today, in order to easily send send information to people, we use mobile apps. That’s why we decided to enable this communication channel in our product. When we began this project, we had some requirements. The code has to be:

  • easily maintainable
  • coded by a small mobile team
  • highly performing
  • customizable

The best option was Flutter.

What is Flutter?

Flutter is a cross-platform development framework created by Google that allows developers to create applications for the Android, iOS, Linux, MacOS, Windows and Web platforms. It was launched in 2017 and has quickly gained popularity due to its ease of use and many advanced features.
Flutter uses a programming language called Dart, which is easy to learn and use. It also offers excellent performance due to its native compilation and use of native widgets to display the user interface. This means that applications created with Flutter are closer to native experience compared to other cross-platform frameworks.

Like its competitors, Flutter also has a package manager: Pub . This tool helps developers to use libraries developed by others, and access certain features such as the camera. As a developer of an application, you can then focus on implementing new features rather than reinventing the wheel.

Widgets in Flutter

In Flutter, widgets are the building blocks of the user interface. They are responsible for rendering the UI and defining its appearance and behavior. Flutter has a wide variety of built-in widgets that can be used to create a range of different UI elements, such as buttons, text fields, and lists.

One of the key features of Flutter is its use of widgets to build the user interface. Unlike some other frameworks, Flutter does not use a separate XML layout file or interface builder to define the UI. In Flutter, you have to declare your UI following declarative UI instead of imperative UI in native languages. It’s easily reusable (an architecture like atomic design is easier to implement) and simple to learn (same language as the rest of the code).

Flutter also has a rich set of tools to create custom widgets. Developers can use them to create their own widgets that can be easily reused in multiple places throughout the app. Thus, the development process is more efficient, as developers don’t have to recreate similar UI elements every time they need them.

In addition to the built-in and custom widgets, Flutter also has a concept called “themes” defining a common set of styling options that can be applied to multiple widgets throughout the app. This makes it easy to maintain a consistent look and feel across the entire app.

Overall, the use of widgets is a great feature for developers to create rich and interactive user interfaces for their apps.

Why Use Flutter instead of Native development apps? (Kotlin/Java & Swift/Objective-C)

One of the main advantages of Flutter lies in the ability to create a single application that works both on Android and iOS platforms without having to create two separate versions. This way, developers can save time and effort as they don’t have to learn how to use two different frameworks for each platform. In comparison, native development requires the use of two different frameworks for each platform, which can make the development process longer and more expensive.

Moreover, if you want to add some native code inside your app, you could easily do this in Flutter with Native Libraries . It enables you to optimize performances or to use some native features. The addition process is described in the Flutter documentation, all you need to know is native development language.

Flutter’s performance can be close to that of a native application, but this depends on many factors such as how the application is designed and how it uses native features. Flutter has been designed to offer approximate performances of native applications by using a Just-In-Time (JIT) and Ahead-of-Time (AOT) compiler to compile Dart code into machine code before or during execution.

And why not use React-Native?

React Native is also a mobile development framework used to create applications for the Android and iOS platforms using the JavaScript programming language. Like Flutter, it allows for the creation of a single application that works on both platforms. However, React Native uses native components and bridges to display the user interface, which can result in a slight loss of performance compared to Flutter. Indeed, the native bridge-based execution model that runs JavaScript code in a JavaScript engine running on a separate thread from the native application.

In terms of developer community and documentation, Flutter and React Native are both very popular and have a large community of active developers. Both also have detailed documentation and many tutorials and examples available online. However, Flutter is supported by Google and is constantly updated, while React Native is supported by Facebook and is less frequently updated. In surveys like this one we can see that there is a growing interest in Flutter and that it is actually the most used cross-platforms framework.

Conclusion

In summary, Flutter is a great choice for developers looking to quickly and efficiently create applications for the Android and iOS platforms. It offers excellent performance, ease of use thanks to its own programming language, a large developer community, and detailed documentation .

Author Avatar

Antoine Debroye