flutter/examples
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
..
api Add AppLifecycleListener, with support for application exit handling (#123274) 2023-06-08 22:57:19 +00:00
flutter_view [Windows] Address feedback for show window comment (#127998) 2023-05-31 23:42:54 +00:00
hello_world Reland "Migrate benchmarks to package:web" (#128266) 2023-06-08 22:25:40 +00:00
image_list [flutter_tools] manually roll pub deps (#127447) 2023-05-30 23:34:52 +00:00
layers Refactor tests (#128371) 2023-06-07 03:02:55 +00:00
platform_channel Reland "Migrate benchmarks to package:web" (#128266) 2023-06-08 22:25:40 +00:00
platform_channel_swift Reland "Migrate benchmarks to package:web" (#128266) 2023-06-08 22:25:40 +00:00
platform_view Upgrade leak_tracker to 5.0.0 (#126367) 2023-05-16 04:39:26 +00:00
splash [flutter_tools] manually roll pub deps (#127447) 2023-05-30 23:34:52 +00:00
.clang-format Implement Linux part of examples (#108068) 2022-12-08 08:44:11 +13:00
flutter_gallery.readme Move flutter_gallery to the testing folder (#52532) 2020-03-16 10:31:42 +01:00
README.md Fix typo in README.md (#126053) 2023-05-04 14:58:17 +02:00

Flutter Examples

This directory contains several examples of using Flutter. To run an example, use flutter run inside that example's directory. See the getting started guide to install the flutter tool.

For additional samples, see the flutter/samples repo.

Available examples include:

Notes

Note on Gradle wrapper files in .gitignore:

Gradle wrapper files should normally be checked into source control. The example projects don't do that to avoid having several copies of the wrapper binary in the Flutter repo. Instead, the Gradle wrapper is injected by Flutter tooling, and the wrapper files are .gitignore'd to avoid making the Flutter repository dirty as a side effect of running the examples.