diff --git a/packages/flutter/lib/src/rendering/binding.dart b/packages/flutter/lib/src/rendering/binding.dart index e83bf5de75..7ef3783211 100644 --- a/packages/flutter/lib/src/rendering/binding.dart +++ b/packages/flutter/lib/src/rendering/binding.dart @@ -209,14 +209,6 @@ mixin RendererBinding on BindingBase, ServicesBinding, SchedulerBinding, Gesture /// changes. /// /// {@tool snippet} - /// Querying [Window.platformBrightness]. - /// - /// ```dart - /// final Brightness brightness = WidgetsBinding.instance.window.platformBrightness; - /// ``` - /// {@end-tool} - /// - /// {@tool snippet} /// Querying [MediaQuery] directly. Preferred. /// /// ```dart @@ -225,6 +217,14 @@ mixin RendererBinding on BindingBase, ServicesBinding, SchedulerBinding, Gesture /// {@end-tool} /// /// {@tool snippet} + /// Querying [PlatformDispatcher.platformBrightness]. + /// + /// ```dart + /// final Brightness brightness = WidgetsBinding.instance.platformDispatcher.platformBrightness; + /// ``` + /// {@end-tool} + /// + /// {@tool snippet} /// Querying [MediaQueryData]. /// /// ```dart @@ -402,11 +402,11 @@ mixin RendererBinding on BindingBase, ServicesBinding, SchedulerBinding, Gesture /// Each frame consists of the following phases: /// /// 1. The animation phase: The [handleBeginFrame] method, which is registered - /// with [Window.onBeginFrame], invokes all the transient frame callbacks - /// registered with [scheduleFrameCallback], in registration order. This - /// includes all the [Ticker] instances that are driving [AnimationController] - /// objects, which means all of the active [Animation] objects tick at this - /// point. + /// with [PlatformDispatcher.onBeginFrame], invokes all the transient frame + /// callbacks registered with [scheduleFrameCallback], in registration order. + /// This includes all the [Ticker] instances that are driving + /// [AnimationController] objects, which means all of the active [Animation] + /// objects tick at this point. /// /// 2. Microtasks: After [handleBeginFrame] returns, any microtasks that got /// scheduled by transient frame callbacks get to run. This typically includes