Flutter How to use lifecycle events in stateless widget? App on close

7,230

Solution 1

This package might do the trick. https://pub.dev/packages/flutter_lifecycle_state

Solution 2

A stateless widget can only be drawn once when the Widget is loaded/built and cannot be redrawn based on any events or user actions.

This kind of widget has no state, so they can’t change according to an internal state, they only react to higher widget changes.

Share:
7,230
otto
Author by

otto

Updated on December 14, 2022

Comments