Table of contents
As you see in the title. This is a question mark (?) that most developers will make when introduced to a new shiny frameworks. Currently in market there are many frameworks that exist Xamarin, Fuse, React Native, Native-Script, Flutter, and so on… All these frameworks were built to solve the same common problem, to be able to build apps cross-platform with one codebase and have a native look, feel, and performance to the App.
What is flutter?.
In simple word-->
Flutter is Google’s UI toolkit for building beautiful, natively compiled applications for mobile, web, and desktop from a single codebase!
Why flutter?.
If you’re an Android developer, you may have heard of Flutter. It’s a relatively new, supposedly simple framework designed for making cross-platform native apps. so if we talk about flutter it’s being used by Google, giving its claims some credence.
Flutter enables you to build —
Beautiful Apps --> No more compromises for your designers.
Fast Apps --> Take the speed limit off your apps
Productive --> Now you can develop while running your apps (save and see result) no more wait for build.
Open --> Everything is Free and Open Source as android
A
B
Apps and Interfaces made with Flutter are built from a single codebase, compiled directly to native arm code, use the GPU, and can access platform APIs and services.
if we have a app which includes some list then in flutter (Dart’s single-threaded concurrency model) we need only two types screens like stateless or statefull and those classes overrides some methods where it return context of application while we go for native android development then we can struggle with many files like
Create list-item layout files in XML
Create an adapter to inflate the item-views and set the data
Create the layout for the list (probably in an Activity or Fragment) Inflate that list layout in the Fragment/Activity
Create instances of the adapter, layout-manager etc. in the Fragment/Activity etc.
** Other framework **
Is Flutter yet another mobile development framework? Absolutely Not!
letsw see in brief
Ever wondered what goes on under the hood of flutter apps? Let’s discuss the different approaches needed to run your apps on multiple platforms.
Approach 1
The first approach is to build a separate app for each platform (native script) like for android java/kotlin and for ios swift/objective c, which often involves a separate team for each codebase. In this system, your code can directly call the built-in platform UI elements, but each codebase will be in a different native language. And your teams will need to ensure consistency between the feature sets in each codebase as the app grows.
Approach 2
Another approach across platform development (hybrid development) uses only one codebase, but it involves either WebViews, in which your app creates HTML and displays it in a web view on the platform, as you can see here, or building a bridge from code in a common language, like JavaScript, to those native UI components
**Flutter (Cross platform approach) Approach **
In both (native and hybrid), the approaches above your app code communicate through a bridge, which may have performance implications. Flutter overcomes this challenge using the following approach —>
Flutter eliminates the bridge and moves your rendering into the app. Internally, Flutter consists of a framework built with Dart and a rendering engine built mostly in C++.
If you like this series please follow me -->