Flutter Pros and Cons : 2020 review (Updated 2021)
What is flutter?
If you like to play around with Dart, use dartpad
In flutter, UI design is achieved by code only. But if you come from a native worlds of app, then this will help you design the UI
Who should use flutter?
My word of advice is, don't simply dive into flutter... you will be lost in one of the widgets
Lets get into Pros and cons
I'm gonna be discussing the pros and cons alternatively because I don't want to leave this discussion on a high note (pros) or on a low note (cons)
1. Reusable Widgets!
Let's say if you have a text input with certain style, don't recreate it every time you need it, just simply define a class and implement an instance every time you need it. A huge performance benefit!
If you are coming from a nodeJS family you can recall the phrase "callback hell" and in flutter, its a widget hell
2. Flutter Packages
Flutter is backed by google and they have one of their own apps (google analytics) designed with it
There are vast number of packages available for any functionality you need. I personally used the camera permission and since I've developed Android Apps natively, it was easy to implement the permission. The packages available here comes with a nice rating widget. This will help you decide how well the package is maintained and its rank.
If packages become obsolete or if the dev stops maintaining it, you are scre**d.
3. Hot Reloading & Hot Restart
One of my favorites! A big Pro for flutter. In native world you may have to wait up to a minute to load the changes but with flutter, it's barely 1 second. But some times, you need to hot restart instead of hot reload. If you are a beginner, this is confusing. Let me resolve it with an example.
Hot reload : For style changes, widget positioning etc
Hot Restart : New widgets, widgets that load values from constants or variables declared etc.
No cons here!
4. Native vs Material
The widgets for example TextField which resembles a TextView (Android) and if you are thinking, they are the same.. you would be wrong. Flutter does a really good job simulating native elements. There are a ton of widgets to try it out in flutter
Take it slow or get overwhelmed.
5. 3rd Party SDK
If you have a native android or iOS SDK, implementation needs a workaround. Check this article on how to implement it.
And some times it simply not possible because of the hardware SDK. Something like a bluetooth card-reader.
6. Quick Turnaround
7. Easy Maintenance
Any app that is well maintained required lot of updates / upgrades. Also, for SEO, the app needs to be updated frequently if you want it to rank higher. Flutter is really cost effective since its really single code base.
Sometimes you have to make platform specific adjustments. For example, to allow camera you need to edit "info.plist" for IOS & "manifest.xml" for Android. Building notifications is a hassle especially for IOS. But there are lot of resources you can rely on to get the functionality