Unverified Commit 88290989 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Reference AppLifecycleListener from widgets library (#132995)

parent 487bd690
......@@ -254,6 +254,11 @@ abstract mixin class WidgetsBindingObserver {
/// documentation for the [WidgetsBindingObserver] class.
///
/// This method exposes notifications from [SystemChannels.lifecycle].
///
/// See also:
///
/// * [AppLifecycleListener], an alternative API for responding to
/// application lifecycle changes.
void didChangeAppLifecycleState(AppLifecycleState state) { }
/// Called when a request is received from the system to exit the application.
......@@ -1171,6 +1176,9 @@ mixin WidgetsBinding on BindingBase, ServicesBinding, SchedulerBinding, GestureB
/// To artificially cause the entire widget tree to be disposed, consider
/// calling [runApp] with a widget such as [SizedBox.shrink].
///
/// To listen for platform shutdown messages (and other lifecycle changes),
/// consider the [AppLifecycleListener] API.
///
/// See also:
///
/// * [WidgetsBinding.attachRootWidget], which creates the root widget for the
......
......@@ -1317,6 +1317,9 @@ abstract class State<T extends StatefulWidget> with Diagnosticable {
/// To artificially cause the entire widget tree to be disposed, consider
/// calling [runApp] with a widget such as [SizedBox.shrink].
///
/// To listen for platform shutdown messages (and other lifecycle changes),
/// consider the [AppLifecycleListener] API.
///
/// See also:
///
/// * [deactivate], which is called prior to [dispose].
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment