flutter/examples/api/test/widgets
Greg Spencer a280346193
Add AppLifecycleListener, with support for application exit handling (#123274)
## Description

This adds `AppLifecycleListener`, a class for listening to changes in the application lifecycle, and responding to requests to exit the application.

It depends on changes in the Engine that add new lifecycle states: https://github.com/flutter/engine/pull/42418

Here's a diagram for the lifecycle states. I'll add a similar diagram to the documentation for these classes.

![Application Lifecycle Diagram](https://github.com/flutter/flutter/assets/8867023/f6937002-cb93-4ab9-a221-25de2c45cf0e)

## Related Issues
 - https://github.com/flutter/flutter/issues/30735

## Tests
- Added tests for new lifecycle value, as well as for the `AppLifecycleListener` itself.
2023-06-08 22:57:19 +00:00
..
actions Fix Action.overridable example (#110824) 2022-09-02 00:46:21 +00:00
animated_grid Add SliverAnimatedGrid and AnimatedGrid (#112982) 2022-10-07 22:15:11 +00:00
animated_list Fix gets removedItem instead of its index (#119638) 2023-02-03 00:15:58 +00:00
app Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
app_lifecycle_listener Add AppLifecycleListener, with support for application exit handling (#123274) 2023-06-08 22:57:19 +00:00
basic Fix MultiChildLayoutDelegate.hasChild doc (#126433) 2023-05-11 14:59:07 +00:00
binding Add AppLifecycleListener, with support for application exit handling (#123274) 2023-06-08 22:57:19 +00:00
editable_text Deprecate these old APIs (#116793) 2023-04-06 19:53:50 +00:00
gesture_detector Remove "note that" in our documentation (as per style guide) (#120842) 2023-02-17 22:27:33 +00:00
hardware_keyboard Explain the "patching" protocol in KeyMessageManager.keyMessageHandler and add an example (#105280) 2022-07-26 05:42:05 +00:00
heroes Revert "Reland: Set IconButton.visualDensity default to VisualDensity.standard (#109432)" (#110119) 2022-08-23 15:41:03 -07:00
implicit_animations Update AnimatedSlide example (#112803) 2022-10-03 18:44:13 +00:00
inherited_model InheritedModel: Add a complete interactive example and update snippet for null safety (#104174) 2022-05-30 06:13:10 -07:00
interactive_viewer Update example code and docs for InteractiveViewer.builder (#98623) 2022-02-16 17:25:17 -08:00
layout_builder Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
magnifier Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
overlay Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
routes Update PopupRoute docs and add an example (#106948) 2022-07-12 08:59:05 +00:00
scroll_notification_observer Add ScrollNotificationObserver sample (#127023) 2023-05-25 15:58:52 +00:00
scroll_position Add ScrollController.onAttach & onDetach, samples/docs on listening/getting scrolling info (#124823) 2023-05-15 21:01:06 +00:00
scroll_view Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
scrollbar Add an example for how to hide default scrollbar on desktop platform. (#108542) 2022-08-18 13:09:23 +00:00
shortcuts Add CallbackShortcuts example (#123944) 2023-04-05 22:17:59 +00:00
sliver Sliver Main Axis Group (#126596) 2023-06-08 15:54:09 -07:00
slotted_render_object_widget Reland "Mixin for slotted RenderObjectWidgets and RenderBox (#94077)" (#94632) 2021-12-03 14:39:02 -08:00
tap_region Replace FocusTrap with TapRegionSurface (#107262) 2022-07-29 16:00:07 +00:00
text Add one DefaultTextStyle example (#122182) 2023-03-08 20:40:54 +00:00
text_magnifier Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00
transitions Add ListenableBuilder with examples (#116543) 2022-12-07 01:15:22 +00:00
will_pop_scope Rename Sample classes (#124080) 2023-04-04 20:34:29 +00:00