For the last four months I have been using swift UI to develop an anti-virus application before that I used later to develop several projects so in this discussion I want to share with you my opinion about flutter vs swift UI.

Difference between Flutter and Swift UI -

Flutter and Swift UI both are declarative UI framework.

So you can create composable components which in flutter are all widgets and in Swift UI called views.

In flutter if we want to show widgets vertically and horizontally we can use column and row widgets similarly in Swift UI we can use Vstack and Hstack.

Layout views for the same purpose in flutter everything is a widget. So suppose if you want to create a text widget and you want to give some styles on that it you have to use another widget that is called text style and you have to assign that widget with the parameter of the text widget but in swift divide not everything is view there are two concepts view and modify.

So you can create a view like text view and if you want to apply some styles like for installers you have to use modifiers. So basically modifiers are methods that interview modify the view and return a new view object.

In flutter there are fundamentally two types of widgets one is is stateless widget and another one is stateful widget.


If you want to store a local state you have to use a stateful widget but in Swift UI there is no such difference you cannot locally step to any views and even you can bind that step those sub views for global or every step management.

In flutter there are different choices you can use provider Dartx blog all of those third-party libraries so that means you have to install any of these libraries before you want to use them but in swift UI you can create an artistic or Goble a beast using built-in libraries you can create environment object and assign that in the master view so that any child view of that must have you can exist that is dead or if you want to create an external estate that you want to use in a few views you can do that by creating and using observable object.

So all of these are built-in options in Swift UI.

So basically if you know Flutter you can also apply some of your knowledge in Swift UI and if you know Swift UI you can apply some of the knowledge in flutter as well.


Which One Should I Learn First ??

So if you ask me which one should I have done it depends on several criteria like a carrier or just perspective personal choice and most importantly the project requirements if a project focuses mostly on iOS users or users from the Apple ecosystem including Mac, Apple watch, iPad, Apple TV.

I will definitely select swiftUI to build the app.

If major portion of an app depends on third-party framework like Facebook which provides native SDK then I will select SwiftUI to build my app and also even want to work for a big company then I will definitely select Swift UI or native iOS development because big companies will not want to depend on another company like Google to develop their apps.

Apple regularly comes up with new bug fixes, new features after there is decay so it is really easy to update the native iOS app but if you use flutter you have to wait until Google implements that and I will definitely choose flutter if I want to develop mostly rest a pay or service based mobile apps and my target audience including both iOS and Android users and for some companies if the UI have not a big budget for their mobile apps the UI may hire me as a flutter developer.

Conclusion -

The last portion is that can I learn both technically? - Yes, you can learn both and you can apply some common pattern to solve common problems using both frameworks the only barrier is that you have to excel in both Swift and dart programming languages as these two languages are strongly typed languages so it is also not a big issue in most cases a developer has to work on multiple programming languages right.

If you want to be a web developer you have to know Java escape and sometimes you have to know Python like that,

 

Thank you .....