diff --git a/packages/flutter/lib/src/material/material_app.dart b/packages/flutter/lib/src/material/material_app.dart index 8612e3ea1a..20cda68719 100644 --- a/packages/flutter/lib/src/material/material_app.dart +++ b/packages/flutter/lib/src/material/material_app.dart @@ -104,6 +104,8 @@ class _MaterialAppState extends State implements BindingObserver { } } + void didChangeAppLifecycleState(ui.AppLifecycleState state) { } + final HeroController _heroController = new HeroController(); Route _generateRoute(RouteSettings settings) { diff --git a/packages/flutter/lib/src/widgets/binding.dart b/packages/flutter/lib/src/widgets/binding.dart index 46ac233c3d..47e61c758a 100644 --- a/packages/flutter/lib/src/widgets/binding.dart +++ b/packages/flutter/lib/src/widgets/binding.dart @@ -16,6 +16,7 @@ class BindingObserver { bool didPopRoute() => false; void didChangeSize(Size size) { } void didChangeLocale(ui.Locale locale) { } + void didChangeAppLifecycleState(ui.AppLifecycleState state) { } } /// A concrete binding for applications based on the Widgets framework. @@ -39,6 +40,7 @@ class WidgetFlutterBinding extends BindingBase with Scheduler, Gesturer, Rendere BuildableElement.scheduleBuildFor = scheduleBuildFor; ui.window.onLocaleChanged = handleLocaleChanged; ui.window.onPopRoute = handlePopRoute; + ui.window.onAppLifecycleStateChanged = handleAppLifecycleStateChanged; } /// The one static instance of this class. @@ -79,6 +81,11 @@ class WidgetFlutterBinding extends BindingBase with Scheduler, Gesturer, Rendere } } + void handleAppLifecycleStateChanged(ui.AppLifecycleState state) { + for (BindingObserver observer in _observers) + observer.didChangeAppLifecycleState(state); + } + void beginFrame() { buildDirtyElements(); super.beginFrame(); diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml index 805ed9f83f..b8eb11f34a 100644 --- a/packages/flutter/pubspec.yaml +++ b/packages/flutter/pubspec.yaml @@ -8,8 +8,8 @@ dependencies: collection: '>=1.1.3 <2.0.0' intl: '>=0.12.4+2 <0.13.0' material_design_icons: '>=0.0.3 <0.1.0' - sky_engine: 0.0.73 - sky_services: 0.0.73 + sky_engine: 0.0.74 + sky_services: 0.0.74 vector_math: '>=1.4.3 <2.0.0' # See the comment in flutter_tools' pubspec.yaml. We have to pin it