Activity

  • Represents a single focused thing the user can do.
  • In Android, you can override methods from the Activity to capture lifecycle methods for the activity itself, or register ActivityLifecycleCallbacks on the Application.
  • In Flutter, you have neither concept, but you can instead listen to lifecycle events by hooking into the WidgetsBinding observer and listening to the didChangeAppLifecycleState() change event.
  • An example of how to observe the lifecycle status of the containing activity:.

Lifecycle events

The observable lifecycle events are:.

Activity — Structure map

Clickable & Draggable!

Activity — Related pages: