What is Flutter and what is Dart?

Last year many people stayed at home with a lot of free time. That is why it was another successful year for mobile and web apps. They become more and more popular and with a huge influence on our lives. But developers can create them with many different tools and Flutter is one of them – in our opinion – the best one.

| What is Flutter?

Flutter is an open-source UI software development kit created by Google. It is designed to support developers in building beautiful and natively compiled applications for almost any platform – mobile (Android and iOS), web (any browser) and desktop (Windows, Mac, Linux) all from a single codebase.

This design helps developers to cut the workload required to develop and deliver the application making the process of app development faster and easier. It is also useful for the end-users, giving them a native experience on every platform.

Flutter has become one of the most loved platforms – in January 2021 Flutter has more than 113K stars on GitHub – the most popular database of repositories. It keeps the position number 16 (from thousands of them), with almost 20% more stars than other similar solutions like for example React Native.

what is Flutter

| The history of Flutter

Flutter was introduced in 2015 with the first version codenamed “Sky” during The Dart Developer Summit. This first version of Flutter was running on Android and was able to render graphics at 120 frames per second and immediately attracted the attention of the development scene.

The first stable version of Flutter 1.0 was released three years later on December 4, 2018. Less than two years later, in May 2020, Flutter version 1.17.0 was released which added the support of Metal API – the 3D graphic and computer shader API created by Apple. Thanks to this, Flutter apps gained a huge performance boost on iOS (some people say about 50% faster!), as well as adding the support for new Material widgets and network tracking.

So far, Flutter has gained global popularity and recognition as a platform of choice for building mobile applications. In the two most popular app stores, we can find thousands of well-written Flutter apps of any size – including apps by Google, Square, Alibaba and BMW. In a later chapter of this e-book, we share more information about some of the best case studies of applications that have been built using Flutter.

| Framework architecture

Flutter is a library built from components:

  • Dart programming language
  • Flutter engine
  • Foundation library
  • Design-specific widgets

Flutter engine

It is a C++- based portable runtime, used for low-level rendering with the Google Skia graphics library and hosting Flutter apps. It is also able to connect with platform-specific SDKs. The most popular way of interacting with Flutter is Flutter Framework – a perfectly selected set of platform, layout, and widgets.

Flutter engine is responsible for connecting all the elements – core libraries (with animations and graphics), plugin architecture, Dart runtime, compile toolchain etc.

Foundation library

It is the core element of the framework. This library is written in Dart, full of basic classes and functions necessary while building the apps In Flutter – for example, dedicated to API –> engine communication.

Design-specific widgets

Widgets are one of the biggest advantages of Flutter. This allows developers to focus only on the new features by selecting common features from the large library of widgets (previously tested and developed) and building the entire UI from blocks.

| What is Dart?

Flutter uses the programming language called Dart. In today’s world, it is necessary to develop for a wide range of platforms to serve content to all audiences. Dart is the answer to this problem as it helps you to code for many platforms at one time – for mobile, desktop, server and web app. Dart is app-oriented, not platform-oriented, which means that it is moving most platform issues away from the developer.

In the past, to develop an app for all platforms, you needed to use many teams and much more code – with Dart, you can use one codebase to serve many platforms. The primary reason is Dart compiles to ARM or x64 for mobile or JavaScript for the web. This method provides a guarantee that Dart will perform fast on all the platforms.

There were four major goals behind the creation of Dart:

  • Strong support base with many libraries and tools
  • Simplifying programming tasks with making common things simpler
  • Stability
  • Scalability

| The history of Dart

The first time Dart was presented was in 2011, during the GOTO conference in Denmark, as a project founded by Lar Bak and Kasper Lund. Two years later, after 18 months in the beta stage, Dart 1.0 was released. Dart 2.0 was presented in 2018 five years later. Since then, Dart has constantly been developed – for example, one of the most interesting updates was version 2.6 adding the dart2native extension. This update extended the native compilation to more desktop platforms like Linux, macOS and Windows. During the time of writing this e-book (January 2021), Dart 2.10.4 has been released.

Dart is a programming language and loved by many developers thus creating an amazing team with the Flutter toolkit. Along with that, Dart is amazingly easy to learn, especially for the developers with experience working in Java, Swift or JavaScript. Everyone who would like to learn Dart or experiment with its programming interfaces can test it in DartPad – a fully online editor with a simple interface, the support of syntax highlighting, code analysis, HTML and CSS editing. Just simply write your code and run it in the same window!

Dart repository

One of the core strengths of Dart is a huge repository of software packages for extending the capabilities of an application – for example, Firebase access for serverless apps. Also, Dart language is supported by many interesting tools including:

  • Dartanalyzer – this helps to evaluate and report code errors
  • Dartfmt – a tool used for the proper Dart code formatting

More and more developers are deciding to use the Dart programming language and building projects in Flutter. Dart has stabilized as a major development language and many applications have been developed using Dart. The primary drivers for this adoption is it’s easy to learn, it promotes developer productivity and is portable to run on several operating systems. This proves that it can be used even for the most challenging projects.

| Summary

We believe that Flutter and Dart is the perfect combination for any mobile, web or desktop app development and with constant development (you can read more about Flutter 2.0) it will only gain new possibilities.

We are sure that in the future popularity of Flutter will explode, as more and more developers see the obvious advantages in it and it’s definitely the best technology to learn nowadays.