Skip to content

Commit 72d71d6

Browse files
committed
feedback: WindowControllerContext.of now returns the WindowController instead of the context
1 parent b902fa5 commit 72d71d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/flutter/lib/src/widgets/window.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ class WindowControllerContext extends InheritedWidget {
286286
final WindowController controller;
287287

288288
/// Returns the [WindowContext] if any
289-
static WindowControllerContext? of(BuildContext context) {
290-
return context.dependOnInheritedWidgetOfExactType<WindowControllerContext>();
289+
static WindowController? of(BuildContext context) {
290+
return context.dependOnInheritedWidgetOfExactType<WindowControllerContext>()?.controller;
291291
}
292292

293293
@override

0 commit comments

Comments
 (0)