Перейти к содержимому

1-3. Flutter Widgets & State for Beginners | Stateless vs Stateful + setState

Behind The Reason Why

0:00 / 0:00

1-3. Flutter Widgets & State for Beginners | Stateless vs Stateful + setState

94 просмотра · 7 дней назад
Behind The Reason Why
22 подписчика
94 просмотра · 7 дней назад
What is state in Flutter, and when should you use a StatelessWidget or a StatefulWidget? In this beginner-friendly Flutter tutorial, we explain widgets, state, and setState() with simple animations, then build a counter app step by step in VS Code. This is part of the Flutter Beginner Tutorials series. In the previous video, we explored the Flutter project structure. In this one, we learn how Flutter widgets show data on the screen and how they update when that data changes. 📌 What you'll learn What state is in Flutter (and in any mobile app) What a widget is, and how the widget tree works StatelessWidget: what it is and when to use it StatefulWidget: the widget + State class pair How setState() tells Flutter to redraw the screen The most common beginner mistake: changing a value without setState() How to pass data from a StatefulWidget to a StatelessWidget ⏱️ Chapters 0:00 – Intro 0:19 – What is State? 1:21 – What is a Widget? (Widget tree) 2:38 – StatelessWidget explained 3:54 – StatelessWidget in code 6:07 – StatefulWidget explained 8:00 – Building a StatefulWidget counter 11:06 – Why the screen doesn't update (without setState) 11:34 – setState() explained 12:22 – StatelessWidget inside a StatefulWidget 14:02 – Recap ▶️ Previous video: Flutter project structure explained → [LINK] 📚 Full Flutter Beginner Tutorials playlist → [LINK] 💬 Got a question about StatelessWidget, StatefulWidget, or setState? Ask in the comments. #Flutter #FlutterTutorial #FlutterForBeginners