DEV Community

loading...

Flutter - Part 1(Complete Beginners Guide)

vishwasnarayan5 profile image vishwasnarayanre ・8 min read

A brief intro to mobile development.

We all know that Android and ios platforms have never had a similar approach for development, the compilers differ wrappers differ, but this problem was always an issue with the software developer who is targeting mobile application. Thus today some companies are interdependent and all of them need a native approach(where both the platform run on the same code base just like the website)this really changed the ideology of web development and thus started to make a huge shift in the developer's mindset also you don't need to really have to just worry about maintenance in the different platforms.

Don't worry about these fancy terms Web, Native and hybrid development, long story short Native and hybrid applications are installed in an app store, while online apps are mobile-optimized websites that behave like apps. Hybrid and mobile applications render HTML web pages, but hybrid apps require app-embedded browsers to do so.

Thus when you want to really make use of the Entire software code base, optimize it, and also use the hardware available efficiently thus this is the point where we go for the native approach. Earlier native developers and the maintenance of the team was a little difficult, Earlier people were supposed to hire developers for Android and ios just like for the ios there is a requirement for the swift developer if we wanted to have an Application native on the Android we needed a Java Developer.

Usually, a startup or a company might not be able to approach this native development as "the software might be open-sourced but the value for the developers is not open-sourced" to hire a good and proficient team to deploy any applications that are required thus this gave rise to a hybrid approach.

Normally in this approach, the performance takes a hit on the performance as:

  1. There are different SDK's for different platforms
    The Software Development Kit (SDK) is a series of software development tools in a single installable box. They make it easy to build programs by providing a parser, debugger, and possibly a programming platform. Normally, they are unique to a hardware platform and an operating system mix. These also will contain different compilers and also different frameworks that work behind the software development process, where every component(software component on device) will start differing.

  2. Different software Framework
    A Software platform is an abstract or concrete framework in which software offering common features can be selectively updated by additional user-written code while providing application-specific software. these are just the functions that you can call only if you have read the functionality in the documentation if required.

  3. No uniformity in the code Base
    I wrote about the SDK and Framework but I will be very frank not all the platforms will have the same frameworks or the SDK's that are optimized for the optimal performance or the performance might be sometimes where the features like graphics, optimization which might not be available. Here I also talk about the hardware performance and also optimization that is taken into considerations.

Thus for all these problems statements that the developer was facing google came up with the cross-platform native development tool called Flutter, but fluter has a downside in the one way they are not as flexible as React Native,xamarin as every time the android and ios come up with the new UI/UX design as Flutter doesn't use the native UI/UX API that Is provided by Apple or Google Flutter uses its own method to draw the UI/UX(literally you feel like you are wiring a window function here), this will make the applications faster.

Flutter needs to come up with their UI/UX APIs to mimic their updates as well., it is a feature release they also will release updates through NPM, very fast, a high-performance application that is developed using Dart, "language" developed by Google, which is very similar to Java and C#.

what is Flutter?

Well that intro in the paragraph above is just to say what was the purpose of this was to get the 2D applications to be deployed faster, this is a software development framework that is used for creating 2D software applications, if you want a full-fledged 3D game this is not the right tool for it you need to learn unity for it as it is the best tool for the development and also make sure that you have developed an application for it and also make sure if you learn unity never forget to learn how to optimize your application as its easy in unity.
Unity is a cross-platform game engine developed by Unity Technology, first revealed and unveiled at Apple Inc. Worldwide Developers Conference in June 2005 as an exclusive Mac OS X game engine. By 2018, the engine has been extended to support more than 25 platforms. just like unity in Flutter you get frameworks that have a search bar, scroll functionality, everything that you can think about in the frameworks thus you should just be good enough to test it.

Pros of unity:

  1. Unity is the best game creation software. It is very effective when rendering 2D and 3D scenes. In this period of visual treats, Unification can also be used to render 3D images. The standard delivered is also reasonably high compared to other applications.

  2. Unity is excellent for cross-platform and multi-platform game development. Cross-production networks are trending a lot these days. It's very time-consuming and it takes a lot of work to create native software. Platforms like Unity have made the mechanism quick and convenient to use as opposed to a previous time. Using cross-development platforms, a single script can be compiled and used for many platforms.

  3. Asset stores are still reportedly large relative to other platforms. In theory, the technology support for Unity is effective. Technical service staff are therefore highly trained and can be counted on in the event of any technical problems.

  4. When it comes to the visual platform, Harmony is excellent. However, we cannot challenge the same in the case of a non-visual forum. It can differ in terms of implementation and use of the app.

  5. The Unity game engine is also simpler to use compared to a variety of other innovations. There are so many more complex technologies that get harder when we're using them. Unity is an exception to this.

  6. While it is not open source, the cost is much lower relative to all the other rivals. Cost efficiency is one of the key benefits of Harmony.

Cons of unity:

  1. The history of some features is very out of date and, in several cases, totally non-existent.

  2. Also technology like render textures, profiler, and stencil buffer support that are common in many free tools are still behind the $1500 paywall. (so it's pretty costly but this is the only tool available and a very effective tool for the 3D game development)

3.The Terrain engine and the Movie Textures are not good at all, and they require a lot of work for no reason at all. (you can just build a terrain like (environment)that you need some time to render it, a separate time is required for development and rendering of terrain)

  1. The Unity 3D Pro license does not add all the functionality to a mobile computer. An additional $1500-3000 investment is then required for Mobile Pro licenses which seems very extravagant.

  2. Before Unity 5.0, the engine will stay 32-bit, which ensures that the editor will quietly fail if you run out of memory and the engine is not ideal for AAA games.

  3. The obsolete (actually old) version of Mono would result in the developer battling the GC as soon as the project hits a certain scale.

  4. There appears to be no forthcoming update for OpenGL 4.x support, but stuff like Compute Shader or Geometry Shader won't be available for OSX or Linux. (OpenGL can be programmed using python but you need a lot of patience to do it thus these frameworks are available thus you need to pay money if you don't have the patience to render and run with the python programing)

Thus when we come to 2D development, Flutter is a handier as the Flutter gives you a single code base for the native application development.

The long intro to unity is for those people who want to do 3D applications in the flutter which is almost impossible without the library thus in my attempt to get you to know everything about the application development (in brief) I had to talk about those topics also

Why learn Flutter?

Flutter is not the only magic Kotlin has very big support where you can write both the server and the client slide scripts for the development. but the magic comes when you have to learn to do it, Flutter is very easy to learn if you have good guidance and easy to implement.
Knowing the fact that it is easy it will take the old developers who were developing in java or swift of course NDK allowed programmers to use a different programming language like C/C++, but I feel it will take huge time for them to get the deployment done, and also it's a perfect chance for you all to have a project of Flutter in your resume.

Flutter's Architecture

The main application used something like a widget tree, but sometimes it differs as developers use sprites for the development but here in Flutter everything is a widget, the buttons, the drop-down menu, the menu section everything combined is just a widget tree.
so now what is a widget tree?
The widget tree is how developers build their user interface; developers place widgets inside each other to create basic and complex layouts. To boost code readability and manageability, developers can split widgets into their own widget class by building a shallower widget tree.

Flutter embraces the Platform difference(this is dependent on the architecture)
As different platforms have different methods to call and handle service APIs, Flutter embraces this completely and this gives developers a chance to debug and optimize the application for performance. (developer need not have to worry about the control of the hardware and software through the application like controlling speaker, camera)
Flutter has the less column and black spaces in the application framework thus you can develop an application that has control over the appreciation and its behavior regardless of the Mobile or the platform is tuned for the frameworks that are used(we have seen how emulator doesn't work if the Android SDK doesn't have an update for the mobile platform hat you desire to run on an emulator, Xiaomi, and other Android phones have different rules for deploying the application ie when you are testing).

Types of Widgets in Flutter
  1. Staful Widget
    Stateful widgets are mutable, you can reuse the code and write the same widgets again, which can be redrawn multiple times.

  2. Stateless Widget
    Stateless widgets are immutable, to draw a stateless widget you need to create a new instance.

How Flutter code compiles into native code

At the center, we have the compiler called "Dart", which makes the widget for the application that we are developing as the frameworks and the other libraries are developed using this programing language only.

We have a Flutter API that sits on the Dart code, that is used in building the stateless and stateful widgets. (everything that you build using this API will be a graphic of 2D nature)

ARM binaries are the one that is being generated from the Dart code, which is both used(understood)by the Android and ios platform.

Thus Flutter gives you the flexibility to get development on to both the IOS and Android using the same code base.

Discussion (1)

pic
Editor guide
Collapse
muzammilaalpha profile image
muzammilaalpha

Keep sharing!