Flutter:- Stateless Widgets and Elements

Flutter Generalization About StateFulWidgets, Stateless Widgets and Elements

Flutter framework architecture works behind the scenes. You learned that Flutter is a great portable UI framework to build mobile applications for iOS and Android. Flutter also plans on supporting development for desktop, web, and embedded devices. You learned that Flutter applications are built from a single codebase that uses widgets to create the UI and that you develop with the Dart language. You learned that Flutter uses the Skia 2D rendering engine that works with different types of hardware and software.

Dart language is AOT compiled to native code, resulting in fast performance for your applications. You learned that Dart is JIT compiled, making it fast to display code changes with Flutter’s stateful hot reload. widgets are the building blocks for composing the UI, and each widget is an immu-table declaration of the UI. Widgets are the configuration to create elements. Elements are the widgets made concrete, meaning mounted and painted on the screen. You learned that the RenderObject implements the basic layout and paint protocols. stateless widget is declared by a single class that extends (inherits) from the StatelessWidget class. Stateful widget is declared with two classes, the StatefulWidget class and the State class. lutter is declarative and the UI rebuilds itself when the state changes. You learned that widgets are the building blocks of a Flutter app and that widgets are the configurations for the UI.

Nesting (composition) widgets results in creating the widget tree. The Flutter framework uses the widget as the configuration to build each element, resulting in creating the element tree. The element is the widget that is mounted (rendered) on the screen. The previous process results in creating the render tree that is a low-level layout and painting system. You’ll be using widgets and
will not need to interact directly with the render tree. You learned that stateless widgets have the
configuration to create stateless elements. You learned that stateful widgets have the configuration to create stateful elements and the stateful element requests from the widget to create a state object.

Install the Flutter SDK, Xcode for compiling for iOS, and Android Studio for compiling for Android devices. When Android Studio is installed on a Mac, it handles compiling for both iOS (via Xcode) and Android devices. You learned how to install the Flutter and Dart plugins to help developer workflows such as code completion, syntax highlighting, run, debug, hot reload, and code analysis.

0 0 vote
Article Rating

You may also like...

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x