Flutter vs. Xamarin: Choosing Your Cross-Platform System

Daniel Sloan Flutter, Mobile, Xamarin Leave a Comment

Attention: The following article was published over 2 years ago, and the information provided may be aged or outdated. Please keep that in mind as you read the post.

Flutter and Xamarin are both strong competitors for cross-platform development systems. Flutter was released in 2017 from Google with its own framework and development kit. Xamarin was released in 2011 by Mono and purchased by Microsoft in 2016. The framework was integrated into the .NET platform using C# as its programming language.

In this post, I will dive into the pros and cons of both Flutter and Xamarin for developing mobile applications. I will detail both platforms regarding programming languages, architecture, installation, UI components, and IDE support. I will then give my personal thoughts and preferences regarding both platforms.

Flutter Pros

Cross-platform development and easy code:
Flutter utilizes the Dart object-oriented programming language. As a result, it is simple for developers who have worked with JavaScript and C languages.

High-Performance:
Dart can compile into native code for both Android and iOS. In addition, the use of widgets reduces the need for data exchange between the app and mobile platform.

Hot Reload:
Whenever a user saves changes to any files in the Flutter projects, the changes will immediately be reflected on the device or emulator. This removes the need to debug and recompile code for every minor change. This speeds up the development and testing process significantly, leading to increased productivity.

Widgets:
Everything in the Flutter environment is a widget. Every button, header, text field, etc., is a widget. This use of widgets leads to an absolutely identical display on all devices. Most cross-platform systems require tweaks and sometimes complete redesign of the user interface for different devices. Flutter removes the need to make multiple UI designs for different devices and platforms.

Low Cost:
Flutter is a completely free environment. Even large companies creating commercial applications do not need to purchase licenses from Google.

Flutter Cons

Large App Weight:
Flutter apps can cause problems for mobile phones that have a limited amount of memory.

Lack of libraries and plugins:
Due to how new Flutter is, Google has not yet created a large number of libraries, and multiple plugins are still being developed.

Native APIs:
Flutter currently has very few built-in APIs. Additional third-party packages will be required for certain implementations utilizing the platform.

Xamarin Pros

Benefits of age:
Even novice developers are familiar with C# and .NET. It has become a standard of education in the field of computer science. This creates general ease of use for most developers. Microsoft also has strong and clear documentation along with the Xamarin Test Cloud to help streamline the development process.

Fast Development and Testing:
The use of shared code and the native Test Cloud, which allows testing on more than 2000 devices, creates an environment for fast development and testing.

High Performance:
Built-in API access, hardware acceleration, and native compilation create applications that run at a high speed.

Xamarin Cons

Large App Weight:
Five megabytes of data are added to finished applications. The debug build will also add between 20 and 25 megabytes. This can create problems for phones with low storage capacity.

License costs:
Commercial Xamarin developments require an individual or company to purchase a license for Microsoft Visual Studio IDE.

Programming Language

Flutter utilizes Dart, an object-oriented programming language. It’s similar to JavaScript, flexible, and has top-notch documentation from Google. When the Dart code is compiled in the Flutter environment, the native Android and iOS are automatically generated.

Xamarin utilizes C#, one of the most popular programming languages today. This has advantages over traditional Android and iOS development, with a high level of nativity and no need to use Java or Swift, respectively. One downside compared to Flutter is that this C# code does not create native applications folders. The code will only be valid in the .Net environment.

Architecture

Most of the necessary components for Flutter are already built into the Dart framework. Communication with native modules is usually not required. There are frameworks such as Material Design and Cupertino that are already implemented.

Xamarin uses a Mono environment. In Android, it runs with Android runtime, and for iOS, it runs with Objective-C runtime and Linux Kernel.

Installation

Installing Flutter is quick and easy. All you need to do is download a file for the operating system you’re using. For example, if you’re using Visual Studio Code, all you need to do is install the Flutter and Dart extensions, and you’re ready to get started.

To get started with Xamarin, you need to start with Visual Studio 2019 (any version). While installing Visual Studio, be sure to select “Mobile Development with .Net” under the workloads tab. This will allow you to download the necessary Xamarin platform files while Visual Studio is installing. If Visual Studio is already installed on your device, you can add Xamarin by rerunning the Visual Studio installer and following the same steps above.

UI Components

As mentioned above, Flutter utilizes widgets. The UI is entirely built by these widgets. These widgets allow for a sleek, unique look to the application. These widgets can be used for smooth navigation, interactive models, layouts, animation, and movement.

Xamarin uses multiple built-in systems that can be learned via the documentation on Microsoft’s official website.

IDE Support

Flutter has the advantage of being completely free from any one development environment. While I personally prefer Visual Studio Code for Flutter development, you may also use IntelliJ IDEA, Android Studio, Eclipse, Atom, Emacs (dart mode), and many more.

With Xamarin, you are restricted to one IDE, which is Visual Studio. Unfortunately, this also forces corporate users to purchase the Visual Studio 2019 license.

Flutter vs. Xamarin Comparison Table:

My Personal Opinion

Throughout my career as a mobile developer, I have worked with Xamarin applications and third-party, workflow-based cross-platform development platforms.

The biggest advantage of Flutter to me is the automatically compiled and generated native apps for both Android and iOS. Working with Xamarin and third-party platforms, a significant amount of time was spent ensuring the UI was user-friendly on not only different platforms but also different-sized devices on the same platform. Multiple UIs needed to be created for phones, small tablets, and large tablets. Building these device-specific UIs after the application has been completed would take days or even weeks, depending on the size of the application.

One major downside to Flutter that I came across is the inability to upload iOS applications to the App Store from any non-Apple device. The workaround is fairly simple. Since Flutter creates a Native iOS application automatically, uploading to the App Store requires pushing the native app to a shared repository and then pulled by a user using an Apple device. That user can then upload the application to the App Store. While this is a bit of a hassle, it is fairly simple.

Conclusion

Although my experience as a mobile developer has mostly utilized Xamarin, there are many benefits to using the newer cross-platform development system, Flutter. After identifying the pros and cons of using either platform, I have ultimately discovered Xamarin and Flutter are both still strong competitors.

The benefits of Flutter include the low cost, hot reload, widget features, and ease of cross-platform development. Despite the inability to upload iOS applications to the App Store from any non-Apple device in Flutter, I have found the workaround to be fairly simple and worth the time investment.

Xamarin boasts its own advantages, including strong and clear documentation, fast development and testing, and built-in API access that makes for high-performance applications. It’s important to keep in mind that commercial Xamarin developments do require an individual or company to purchase a license for Microsoft Visual Studio IDE, while Flutter is cost-free.

Whichever cross-platform system you decide to work with, I hope this post provides some helpful insight in making your decision. For more info on how Keyhole helps clients harness the benefits of the mobile platform, check out our Mobile Solutions page. Whether it be Xamarin or Flutter focused, we’ve got our clients covered.

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments