Flutter vs Native for Mobile Development

Sung Woo Chang
The Startup
Published in
5 min readMay 12, 2020

Introduction

Recently, Flutter became a rising star on mobile app development and it looked very promising. I didn’t want to fall in love with this new framework because I was so disappointed with Xamarin / React Native. These two cross-platform frameworks made me believe native mobile development is the only answer. However, I was so tired of writing the same codes twice for iOS and Android. I did a lot of research on Flutter and decided to try it out.

I know making a tech decision is enjoyable, but at the same time, very painful. To help you make a great decision, I want to share my thoughts and experience in Flutter compare to Native iOS / Android development.

Learning Curve

Flutter uses Dart as its main programming language. It is not hard to get used to it if you are already familiar with Java and Javascript. I felt Dart is less productive and old-style compared to Swift/Kotlin. Also, some of its features and concepts are hard to understand. I prefer to write codes in Swift/Kotlin but don’t worry too much. Dart is fair enough.

You have to write codes for UI. Yes, this is the only option we have. There is no XML, Storyboard, or Interface Builder. However, it is actually where Flutter shines. If you write codes for UI, resolving merge conflicts becomes much easier and state management becomes much cleaner. If you have some experience with SwiftUI or React Native, it will be very easy for you. Even if you have not done writing codes for UI, I strongly recommend you to try it out since Declarative Style UI programming, like Flutter and React, is a strong trend and it will introduce a new world of UI programming to you. No worries, it is simple and easy.

However, state management in Flutter is where most people get stuck if they came from native mobile developments. There are multiple approaches to manage states. You will need to spend a decent amount of time on reading about Stateful Widget, BLoC, and Provider.

I won’t say the learning curve is flat since we all have different backgrounds. However, I personally enjoyed learning Flutter a lot and its documentation is apparently easy and beautiful.

Productivity

Once you get familiar with Flutter, Flutter is the clear winner in productivity.

We spend most of the time waiting for builds on the native mobile developments. A large iOS project usually takes more than one minute to build and Android is worse. The incremental build and the instant build improved its speed a lot but it’s still too slow compared to Flutter and React Native. With Flutter’s hot-reload and refresh, it only takes a few seconds. 👏

Since engineers can simply write once and run the app on both iOS and Android, it is easy to double productivity. Writing the same code twice is the most painful and boring process and this is the main reason people look for cross-platform frameworks like Flutter. Although we may need to spend some extra time on writing UI codes if we need different UI styles for each platform, it is still MUCH better than writing the entire app twice.

Of course, there are some drawbacks to using Flutter. Google released the first official Flutter version in 2018 and it’s still very young compared to the native mobile developments. There are two problems with Flutter’s immaturity. I found myself fighting against its own issues. There are a lot of issues with Flutter that we did not have to worry about in the native developments. WebView is one of the examples that Flutter has a lot of issues and there are more than 5,000+ unresolved issues on its Github. Another problem is that Flutter and Dart have much less open-source libraries compared to native iOS and Android. Do not forget reinventing the wheel can be very exhausting. However, I see it’s getting better as the community grows very fast. I wouldn’t worry too much about the problems in the long term.

Performance

It is hard to compare because there are multiple factors that impact performance. One thing to keep in mind is that Flutter isn’t just a layer on top of native apps. It also brings a new architecture. Sometimes Flutter apps will perform better and sometimes they won’t. However, I won’t expect Flutter apps to have better performance since Android and iOS have put much more effort into performance optimization over the last 10 years.

Theoretically, a native app will always be the best performer in most cases, if everything is done correctly. But if you understand Flutter and use it correctly, the performance is good enough. Flutter promises a consistent 60 FPS. It means Flutter has good enough performance to display a smooth animation and clear UI.

Conclusion

After reading the above sections, you may think Flutter is a great choice for your project. However, this is not always true. In the following cases, you will be happier to stick to the native iOS / Android developments:

1. The app is for tvOS, watchOS, CarPlay or Android Auto

  • You cannot build a Flutter app on these platforms.

2. The app needs to use C and C++ libraries

  • Dart doesn’t support C/C++ interop.
  • Edited: you can use Dart:ffi library is for C interop!

3. The app uses a lot of third-party libraries

4. The app requires a large team to develop and maintain

  • It’s hard to find skilled Dart/Flutter engineers.

5. The app needs to use a lot of WebViews

  • Flutter WebView is limited and has a lot of performance issues. You will find yourself rewriting your app on native.

6. The app should have a small file size

  • A Hello World app is 4.7MB on Flutter and 550KB on the native apps

Otherwise, I strongly recommend using Flutter. I started my career as an Android Engineer and now I am working as an iOS engineer. However, I honestly do not see any reason to avoid Flutter for CRUD apps.

Try Flutter!

https://flutter.dev/

--

--