Flutter Fundamentals
Widgets, StatelessWidget, StatefulWidget, widget tree, build method, hot reload
1What is a widget in Flutter?
What is a widget in Flutter?
Відповідь
In Flutter, everything is a widget. A widget is an immutable description of part of the user interface. Widgets describe what their view should look like given their current configuration and state. Flutter uses these descriptions to build the element tree that manages the on-screen rendering.
2What is the main difference between StatelessWidget and StatefulWidget?
What is the main difference between StatelessWidget and StatefulWidget?
Відповідь
A StatelessWidget is immutable and cannot change after creation. It is used for UI elements that do not change dynamically. A StatefulWidget can maintain mutable state through an associated State object, allowing the UI to rebuild in response to state changes.
3Which method must be implemented in every widget to define its user interface?
Which method must be implemented in every widget to define its user interface?
Відповідь
The build() method is mandatory in all Flutter widgets. It receives a BuildContext as a parameter and returns a Widget that describes the user interface. This method is called whenever the framework needs to rebuild the widget, for example after a setState() call in a StatefulWidget.
What is the widget tree in Flutter?
What is the difference between hot reload and hot restart in Flutter?
+15 питань зі співбесід
Інші теми співбесід Flutter
Dart Basics
Dart Language Essentials
Widget Lifecycle
Local Storage
Application Lifecycle
Layouts & Constraints
ListView & GridView
Navigation & Routing
Basic State Management
Provider Pattern
Networking & HTTP
JSON Serialization
Local Database
Forms & Validation
Animations
Firebase Integration
Unit Testing
Widget Testing
Build & Deployment
Package Management
Memory & Performance
Streams & RxDart
Advanced State Management
Flutter Design Patterns
Performance Optimization
Platform Channels
Custom Painting
Flutter Application Architecture
Опануй Flutter для наступної співбесіди
Отримай доступ до всіх питань, flashcards, технічних тестів, вправ code review та симуляторів співбесід.
Почни безкоштовно