Adding interactivity to your Flutter app

UI

Adding interactivity

Stateful and stateless widgets

Creating a stateful widget

Step 0: Get ready
Step 1: Decide which object manages the widget’s state
Step 2: Subclass StatefulWidget
Step 3: Subclass State
Step 4: Plug the stateful widget into the widget tree
Problems?

Managing state

The widget manages its own state
The parent widget manages the widget’s state
A mix-and-match approach

Other interactive widgets

Standard widgets
Material Components

Resources

What you’ll learn

How to respond to taps.

How to create a custom widget.

The difference between stateless and stateful widgets.