We use cookies on our website, hope you don’t mind. Just imagine a plate of delicious meringues, they look like clouds. Read more

Development

Is Flutter The Best Way To Build Cross-Platform Mobile Apps?

When building a new application nowadays, you don’t have to constrain yourself to only one of two major systems on the market – iOS or Android. At this point, many companies have figured out that maybe they could develop a tool that would allow us to write only one codebase for both systems.

While more sophisticated programs still require creating separate projects for each system, many of the projects we work on are pretty standard affairs. They download data from the server and display it to the user in a neat UI. Sometimes they have to upload a file or two to the backend.

We ended up with a plethora of cross-platform mobile SDKs, which let us create projects that would run on both systems with varying degrees of ease and producing different performances. The most notable examples of such frameworks include React Native by Facebook (which we currently use for cross-platform development at 10clouds), Xamarin by Microsoft, and – recently introduced – Google’s own Flutter.

Why you should use Flutter as a mobile developer

When I surveyed the world of cross-platform mobile solutions, I found that the most prominent and recommended framework is React Native, followed by Xamarin. But both of them have major flaws for me as an Android developer. They both require changing your IDE, and Android Studio/IntelliJ is much beloved in the dev community, for good reasons.

React Native, using JavaScript, has no official IDE, and according to my findings, it looks like it’s geared more towards front-end web developers who want to start developing mobile apps. The toolchain is quite customizable, but you need to assemble it – pretty much – yourself.

Xamarin, on the other hand, is powered by C#, which is much closer to Java. I had earlier run-ins with that language and found it pretty pleasant to use. The development is restricted to Visual Studio IDE, though, and the last time I used it, I found it pretty basic without the ReSharper plugin – which is a paid add-on created by the company behind IntelliJ. Besides, it seems that Xamarin still needs creating platform-specific views for the applications to look good on both systems. This means that only 60% to 90% of the codebase can be shared.

Turned off by both of the biggest cross-platform solutions, I remembered Flutter SDK being advertised during Google Developer Days in September this year as the new SDK for building multi-platform, native mobile apps, and decided to give it a try.

What is Flutter again?

Flutter is a cross-platform mobile SDK currently being developed by Google – which, hopefully, will prevent from sudden axing. It uses Google’s own language, called Dart. It is quite similar to JavaScript, but it has optional, built-in type safety support (the type safety is required for Flutter, but can be disabled for writing other projects). This feature takes it a little bit closer to Java, and makes it a little easier to wrangle for someone who never worked with dynamically typed language before.

Flutter’s makers boast of their own rendering engine, which is supposedly more efficient and flexible than what the competition has to offer. And most importantly – Google has provided the developers with an Android Studio plugin and support, so I can write in Flutter with my favourite IDE. Yay!

Is Flutter The Best Way To Build Cross-Platform Mobile Apps?
Flutter code in Android Studio

SDK tools for writing Flutter applications

Flutter SDK installation is easy enough. First of all, you have to clone the Flutter GitHub repo to your computer, and from there you can run the Flutter doctor command, which will check required dependencies and guide you through the steps necessary to install them if they’re missing.

Everything worked out-of-the-box on my MacBook, but I couldn’t, for the life of me, install the SDK properly on my home PC with Windows. That shouldn’t be too much of a problem, since you wouldn’t be able to compile an iOS version of the app in that environment anyway, but I must admit it tainted my first impression of this tool. Both Dart and Flutter plugins for Android Studio are available in the plugins repository, and I was able to install them easily through the built-in plugin manager.

Flutter pros and cons

Using Flutter does have many advantages, but there are also drawbacks. The biggest flaw of this tool is its maturity – or lack thereof. It is still in the alpha state, and so far, no date has been announced for the release of the 1.0 version. The APIs are subject to change, and some major features (e.g., push notifications, local databases, or JSON object serialization/deserialization) are still missing. Nevertheless, the new versions of the SDK are released quite frequently.

Is Flutter The Best Way To Build Cross-Platform Mobile Apps?
Flutter Code Lab application running on Android emulator and iOS simulator

Flutter is also wildly different from the Android SDK, so the transition from mobile development is far from instantaneous – at least it wasn’t instantaneous for me. During a two-week period, I managed to gain some insight into how Flutter applications are structured and how Dart works, but if I wanted to start building “real” applications, I would have to devote much more time to get comfortable with the app architecture and language concepts.

The UI in Flutter applications is built in code. This allows us to build the UI for both systems at the same time and use the widgets Flutter SDK provides us with, but it also has its downsides. As for now, we cannot preview the interface without running the application, same as it is with Android XML layouts. Besides, if we want to use separate UIs for iOS and Android, we’ll have to use native code for creating those on each platform. Of course, Flutter apps cannot use a system’s native widget without writing native code either.

Is Flutter The Best Way To Build Cross-Platform Mobile Apps?
Flutter code hot swap in action

Flutter definitely deserves a big thumbs-up for ease of setup. On OS X, it took me (at most) half an hour to get everything up-and-running, but it would probably be a bit longer if I hadn’t already had Android Studio and Android SDK installed.

The apps built in Flutter are also reported to perform better than those made with Xamarin or React Native, but I could not verify this myself, as I don’t have any previous experiences with mobile cross-platform solutions.

My doubts about Flutter

The future of Flutter is still not certain. It still doesn’t have a release date, and it’s still in alpha stage, which means that further support is not a certainty. I don’t think it’s very likely that support would end, though. Google is promoting this new tool in its conferences, so that might be a sign the company wants more and more people to start using it.

Another potential trap for the would-be Flutter developers is jumping on that bandwagon too quickly, as I mentioned earlier. Even if you have a lot of experience developing mobile applications, you probably wouldn’t be able to transition to Flutter instantly. The best approach would be testing the waters with some smaller projects before trying to port your long-running application.

What’s next for Flutter?

Is Flutter going to replace native apps? Not very likely. But it can probably take a good piece of the mobile applications market, since many are simple enough to implement easily. I also see a huge potential in using Flutter for implementing business logic for applications and writing UI in native SDKs.

But, as it is with all of the programming SDKs, a lot depends on community reception and adoption, which in turn depends on many factors, not all of which are technical. Engagement from “outside” developers would ensure steady growth of new libraries and ensure community support for beginner developers.

Your thoughts on Flutter?

How about you? Do you have experience working with Flutter, or other cross-platform mobile SDK’s? How do they compare? Maybe you are interested in replacing your current tool with Flutter? Let me know it the comments below!

Check out these links if you want to read more:

Jakub Komorowski

Android Developer

  • Yes but not flutter.
    As you said the biggest problem with flutter is maturity which our product (Codename One) has in spades.

    It works with a similar conceptual architecture but has the following key advantages:

    – Works with Java & Kotlin as the language – both of which have FAR more traction than Dart
    – Far more portable available on more platforms e.g. Windows, UWP, Desktop & even JavaScript
    – Superior VM approach on both Android & iOS by matching closely to the OS native approach of building apps
    – Doesn’t require a Mac for iOS or Windows for Windows development
    – Supports integration with native OS widgets e.g. Google Maps etc.
    – Has multiple 3rd party integration & commercial support options

    • Густав Кутугутов

      Building on cloud? No, thanks

      • You can build offline with our offline support or with the sources. Regardless of that why not?

        People used to be against cloud for servers (I don’t want hardware I don’t own). We moved a long way.

        • Joan Nabusoba

          Your platform sounds great. I am trying flutter, but I still have a million doubts and fears about it. What are your statistics? I don’t mind building in cloud

          • What sort of statistics?

            We have way more apps and users than flutter but we’ve been around longer.

            FYI we support PWA’s too via our JavaScript port.

    • Jakub Komorowski

      I will definitely look into what your tool has to offer when I’ll have some spare time – I must admit I really like the idea of developing cross platform apps with Kotlin!

      • Sure thing. Drop me a line if you need help or have some feedback/wish list.

  • amugofjava

    What I like about Flutter & Dart at the moment is that they are just great fun to develop in! I’ve tried many different languages and frameworks over the years but Dart & Fllutter are the first to really excite me in a long time. I really hope they take off – but if not – I’m still going to have fun with it.

  • Michael Dresser

    A follow-up to your comments about the UI:

    Beginning by learning Dart, I’ve been building a Flutter app for ~5 months, with help from a designer who had no prior coding experience. I block out the UI, then he runs the app on his workstation and, with hot reloading, tweaks the code (which is generally self-explanatory) and sees the changes ~immediately. Within 5 weeks, the designer was using Stack Overflow to find ways to add code blocks to generate the effects he wanted. It’s a really powerful and satisfying work flow, with near-production-ready code coming back to me from the designer.

    Although we’re going for a consistent look on Android and iOS, Flutter provides UI elements that are Android and iOS look- and work-alikes (their “Material” and “Cupertino” widget sets) and that can easily be swapped out at run time based on the hosting platform. Also, Flutter is open source, so modifying provided widgets, or building new ones from scratch, is relatively straightforward.

    I have no affiliation with the Dart or Flutter teams, I just appreciate the design decisions made by both, which clearly were aimed at developer happiness. Echoing the sentiment from @amugofjava, this project has really been fun.

    • Jakub Komorowski

      That’s good to know, thanks! Did you tried implementing your own widgets already? Or did you found out the ones provided by existing libraries are enough?

      • Michael Dresser

        We aimed for a (very) minimum viable product, so we chose to use the existing libraries. We departed a little bit from this and adapted Flutter code for the Material date picker, which was fairly straightforward to extract and modify, to make a calendar widget. (You can see this in our (shameless plug) AnglerHub app that just got released on the Play and App Stores – it’s free, feedback welcomed.) It’s so easy to customize the look of the available widgets, and to use them in composition, that we just haven’t been tempted to spend the time. Yet.

  • Torah Bright

    I agree with the author’s opinion that the future of Flutter is still not certain. It is necessary to think properly before undertaking steps of development. I found fetching details about other kinds of mobile elaboration, you should take into consideration:https://mlsdev.com/blog/151-how-to-port-your-app-to-another-platform

  • very useful article

  • yaron levi

    The way I see it, Flutter future is very certain. I think it’s a good candidate for a “React Native killer” and could easly take the sit as the best tool for cross platform dev.

    I’ll go even further and say that it might even replace the “old native” way of building Android apps (and iOS apps).

    When writing an app with Flutter you have a very powerful and flexible tool that can potentially achieve complex and fluid UI behaviors that won’t be possible in a native android SDK.

    Flutter’s rendering engine is a low level API that frees the developer from restrictions created by high level api and UI components. It like writing an app with a Game Engine vs writing an app with Windows Forms.

    Another big advantage is the reactive and componentized nature of flutter widgets, which aligns well with the one of the preferable ways to build UI these days (React). Compare this to mess that is regular development with Android Studio/xcode which makes it very hard to architect your code and seperate concerns.

    • I highly doubt that Yaron.

      – Google had many big projects released with huge funfair (e.g. Google+, Wave, Code, etc.) or those that die off or go into low end maintenance mode (e.g. App Engine).

      – This isn’t a big project that Google as a company is emphasizing. It’s a small localized project. Two of the Android lead UI developers recently quipped on twitter: “Write Once Run far far Away”.
      In fact Android specifically picked Kotlin over Dart despite company internal biases towards Dart. Google is notoriously bad at promoting “hobbies”. If you look at the big Google success e.g. Android, Chrome, gmail etc. They only happened when Google got behind them completely as a company.
      Furthermore, Google has 0 interest of this product existing. They own the market leader (Android) why in the world would they want people to write cross platform apps?
      That makes no sense for Google from a business perspective.

      – We’ve been doing low level graphics API to render widgets graphics like this for years at Codename One. So has QT before us and a few others. Flutter doesn’t bring anything new to the table in that regard. However, it does bring problems with native interactions… Does it have a WebView component already?

      – The mess of regular development in xcode/Android Studio has little to do with reactive programming and everything to do with tools that evolved over time to serve very different purposes from their original intention. So it’s not a comparison of equivalent tools. If you compare Kotlin code on Codename One with reactive code in Flutter you will see that our code is just as elegant and easier to follow/debug & optimize.

      • yaron levi

        Comparing Flutter to Google+, Wave or other graveyard projects is wrong IMO. I agree with you that Google has a bad reputation regarding abandoned projects, but when looking on Flutter, you must also look at Fuchsia OS and the big picture. This post summarize the pretty well the reasons why Google might want to make the shift to Fuchsia (“Will it replace Android?”):

        https://www.pocket-lint.com/laptops/news/google/138518-google-fuchsia-os-what-s-the-story-so-far

        • So, I’m an ex-Sun guy and I’ve worked in building mobile phone VM’s since the 90’s. As part of that my best friend was at a meeting with T-Mobile (as a Sun rep) after they launched the first Android phone on their network and the guys at T-Mobile really laughed at the prospect of Android picking up.

          You can say they were stupid, but hindsight is 20/20. They weren’t stupid. Android was a dud. People don’t remember that.

          2 things picked it up:

          1. Google put everything into it. Everything!
          Android challenge, giving away free hardware, nexus one etc.

          2. Verizon & Motorola – until they pushed out the first Droid Android was a failure.

          Fucia is facing an uphill battle where Google and everyone else have a ridiculous amount of money invested already in Android. Android was facing Symbian which was crap and the old Windows Mobile which was arguably worse. Android won’t stand aside to let Fucia have its way. Even if Google controls Android the vendors and operators don’t want to go a different route and won’t.

          Google has shown how little control it has, it can’t even get people to upgrade the version of Android they have. Expecting them to move to a new OS is insane. They can’t even unify Chrome & Android.

          Yes, they have an incentive to move to Fucia but it’s not a reasonable thing they can realistically do.

          Another thing, one of the problems for Nokia was due to it’s multiple OS strategy. They had multiple concurrently supported OS’s including Symbian, S40 & their Linux variant with Intel. Then they added Windows Phone.

          Google has 2 major OS’s which everyone including Google say is too much. They are trying to unify them going mostly in the Android direction. Adding another OS… Doesn’t make sense. Replacing the Android Kernel will make more sense than building a new OS.

          But lets say there is a miracle and Fucia somehow gains some traction. Then are the millions of Android apps stuck?

          No. Google already ported the Android VM to Chrome so it will be on Fucia too. There is literally zero incentive.

      • Sean Knowles

        Google has completely rewriten there AdWords engine in flutter… Which is there primary revenue driver.. if I am not mistaken

  • Joan Nabusoba

    I agree with your article. What do you think is the most promising cross-platform tool other than progressive apps?

  • ashwan kumar

    Hello Jakub,
    Thanks a lot for the detailed information on the mobile frameworks. I would like to work on an idea I have but not sure which framework to use. As the flutter is preview version 1.0 is release in recent time, can I start learning it to build my application or do you suggest any other framework to start with and later migrate it into flutter? I believe in Google products and their quality, so I think, it’s a good idea to work with flutter. Please guide me on this and thanks a lot for this detailed article.

  • Alexander Fagrell

    Thanks for this!

    Was just wondering if you ever tried Qt and your thoughts on doing cross-platform apps using it compared to Flutter?

you may also like these posts

Blog image

This React Native Feature Saves Your Company Time and Money

Blog image

7 Things Your Development Agency Won’t Tell You

Blog image

How Vue.js Helped Me Start My Angular Career

SUBSCRIBE TO OUR NEWSLETTER

Get more stuff like this in your inbox.

Thank you for signing up!

You’ve been added to our mailing list.

Free project quote

Fill out the enquiry form and we'll get back to you as soon as possible.


Thank you for your message!


We’ll get back to you in 24 hours.

Meanwhile take a look at our blog.

Read our blog
Gareth N. Genner Photograph

Gareth N. Genner

Co-Founder of Trust Stamp

Quote

We needed a partner who could take on our idea, and make it real. 10Clouds bring so many different skills. We feel that every member that’s involved in the project is a member of our team.