View video tutorial

FLUTTER Introduction

FLUTTER

Flutter is a single codebase that builds apps for all platforms.

Flutter Application


➔ The Flutter SDK can build native Android and iOS apps, desktop apps, and web apps from a single codebase for all platforms.

➔ A single codebase means that creating an application using the Flutter framework also creates apps for other selected individual platforms, so there is no need to write separate applications for each platform.

➔ Everything in a Flutter application is a widget. Widgets are a Flutter component and building block for Flutter applications.

➔ A widget contains other widgets and creates a tree-like structure for building a complete application.

➔ Many widgets come as pre-built widgets with the Flutter framework, and new widgets keep coming with new releases that help create beautiful Flutter UI and functionality.

➔ A complex design or task is broken down into multiple widgets and finally assembled to complete the entire task.

➔ Each widget is designed to perform specific functions. Developers can create custom widgets for a specific task.

Types of widgets

Stateless widgets

➔ Flutter stateless widgets are immutable, static UI elements.

➔ Stateless widgets cannot be modified once the render is complete.

➔ Stateless widget properties are final, so the widget's state or appearance remains the same even after creation.

➔ Stateless widgets are only rebuilt when the parent widget is rebuilt or the configuration changes.

➔ They are ideal for constant information such as text, icons, or still images or any information that does not change.

➔ They are lightweight and fast because they do not carry any dynamic state features.

Stateful widgets

➔ Flutter stateless widgets are mutable, dynamic UI elements.

➔ Stateful widgets can be dynamically modified after rendering.

➔ Stateful widget properties are not immutable, so the state or appearance of the widget can be changed with user interaction.

➔ Stateful widgets are rebuilt when the parent widget is rebuilt or the configuration changes, and at any time during user interaction

➔ Stateful widgets are ideal for UI elements that change based on user interaction or data, such as checking a checkbox, incrementing a counter, calculating and displaying values ​​entered by the user, loading data from a datasource etc.

➔ They are not as fast as stateless widgets because they carry dynamic state properties and maintain the value of the state properties while the application is running.