Unverified Commit 6c048301 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Revert "WIP2" (#54286)

parent ce92333b
...@@ -6,7 +6,7 @@ import 'dart:async'; ...@@ -6,7 +6,7 @@ import 'dart:async';
import 'dart:convert' show json; import 'dart:convert' show json;
import 'dart:developer' as developer; import 'dart:developer' as developer;
import 'dart:io' show exit; import 'dart:io' show exit;
import 'dart:ui' as ui show AppLifecycleState, saveCompilationTrace, Window, window; import 'dart:ui' as ui show saveCompilationTrace, Window, window;
// Before adding any more dart:ui imports, please read the README. // Before adding any more dart:ui imports, please read the README.
import 'package:meta/meta.dart'; import 'package:meta/meta.dart';
...@@ -552,29 +552,6 @@ abstract class BindingBase { ...@@ -552,29 +552,6 @@ abstract class BindingBase {
}); });
} }
// TODO(goderbauer): Remove the next two members after the service/scheduler dependencies
// have been turned around.
/// Whether the application is visible, and if so, whether it is currently
/// interactive.
///
/// This is set by [handleAppLifecycleStateChanged] when the
/// [SystemChannels.lifecycle] notification is dispatched.
///
/// The preferred way to watch for changes to this value is using
/// [WidgetsBindingObserver.didChangeAppLifecycleState].
ui.AppLifecycleState get lifecycleState => null;
/// Called when the application lifecycle state changes.
///
/// Notifies all the observers using
/// [WidgetsBindingObserver.didChangeAppLifecycleState].
///
/// This method exposes notifications from [SystemChannels.lifecycle].
@protected
@mustCallSuper
void handleAppLifecycleStateChanged(ui.AppLifecycleState state) { }
@override @override
String toString() => '<${objectRuntimeType(this, 'BindingBase')}>'; String toString() => '<${objectRuntimeType(this, 'BindingBase')}>';
} }
......
...@@ -299,7 +299,6 @@ mixin SchedulerBinding on BindingBase { ...@@ -299,7 +299,6 @@ mixin SchedulerBinding on BindingBase {
/// ///
/// The preferred way to watch for changes to this value is using /// The preferred way to watch for changes to this value is using
/// [WidgetsBindingObserver.didChangeAppLifecycleState]. /// [WidgetsBindingObserver.didChangeAppLifecycleState].
@override
AppLifecycleState get lifecycleState => _lifecycleState; AppLifecycleState get lifecycleState => _lifecycleState;
AppLifecycleState _lifecycleState; AppLifecycleState _lifecycleState;
...@@ -309,9 +308,9 @@ mixin SchedulerBinding on BindingBase { ...@@ -309,9 +308,9 @@ mixin SchedulerBinding on BindingBase {
/// [WidgetsBindingObserver.didChangeAppLifecycleState]. /// [WidgetsBindingObserver.didChangeAppLifecycleState].
/// ///
/// This method exposes notifications from [SystemChannels.lifecycle]. /// This method exposes notifications from [SystemChannels.lifecycle].
@override @protected
@mustCallSuper
void handleAppLifecycleStateChanged(AppLifecycleState state) { void handleAppLifecycleStateChanged(AppLifecycleState state) {
super.handleAppLifecycleStateChanged(state);
assert(state != null); assert(state != null);
_lifecycleState = state; _lifecycleState = state;
switch (state) { switch (state) {
......
...@@ -19,7 +19,7 @@ import 'system_channels.dart'; ...@@ -19,7 +19,7 @@ import 'system_channels.dart';
/// the licenses found in the `LICENSE` file stored at the root of the asset /// the licenses found in the `LICENSE` file stored at the root of the asset
/// bundle, and implements the `ext.flutter.evict` service extension (see /// bundle, and implements the `ext.flutter.evict` service extension (see
/// [evict]). /// [evict]).
mixin ServicesBinding on BindingBase { mixin ServicesBinding on BindingBase, SchedulerBinding {
@override @override
void initInstances() { void initInstances() {
super.initInstances(); super.initInstances();
......
...@@ -86,12 +86,6 @@ class TestBindingBase implements BindingBase { ...@@ -86,12 +86,6 @@ class TestBindingBase implements BindingBase {
@override @override
ui.Window get window => throw UnimplementedError(); ui.Window get window => throw UnimplementedError();
@override
ui.AppLifecycleState get lifecycleState => null;
@override
void handleAppLifecycleStateChanged(ui.AppLifecycleState state) { }
} }
class TestPaintingBinding extends TestBindingBase with SchedulerBinding, ServicesBinding, PaintingBinding { class TestPaintingBinding extends TestBindingBase with SchedulerBinding, ServicesBinding, PaintingBinding {
......
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