diff --git a/packages/flutter/lib/src/widgets/binding.dart b/packages/flutter/lib/src/widgets/binding.dart index f5d2a4fe8d59e..d0fdbcf9ca00e 100644 --- a/packages/flutter/lib/src/widgets/binding.dart +++ b/packages/flutter/lib/src/widgets/binding.dart @@ -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 diff --git a/packages/flutter/lib/src/widgets/framework.dart b/packages/flutter/lib/src/widgets/framework.dart index c1c45fcbfa097..4443a141333d1 100644 --- a/packages/flutter/lib/src/widgets/framework.dart +++ b/packages/flutter/lib/src/widgets/framework.dart @@ -1317,6 +1317,9 @@ abstract class State 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].