From dda59347b01bea6e03278120c729e02653186345 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Tue, 18 Aug 2026 02:04:56 -0700 Subject: [PATCH] Track the Flutter master windowing rename in the editor Master dropped the Regular prefix (RegularWindowController -> WindowController, RegularWindow -> Window, RegularWindowControllerDelegate -> WindowControllerDelegate) and now re-exports ScrollCacheExtent from material.dart. Signatures are unchanged, so the API change is a rename. main.dart also takes two tall-style method-chain reflows the master formatter requires. --- apps/flutter_scene_editor_app/lib/main.dart | 6 +++--- .../lib/src/panels/outliner_panel.dart | 1 - .../lib/src/shell/docking_shell.dart | 10 +++++----- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/apps/flutter_scene_editor_app/lib/main.dart b/apps/flutter_scene_editor_app/lib/main.dart index f8bee5df..ab51964b 100644 --- a/apps/flutter_scene_editor_app/lib/main.dart +++ b/apps/flutter_scene_editor_app/lib/main.dart @@ -31,7 +31,7 @@ void main() { exit(1); } WidgetsFlutterBinding.ensureInitialized(); - final controller = RegularWindowController( + final controller = WindowController( size: const Size(1280, 800), // The runner styles the window with a hidden title bar by this title // (see AppDelegate.swift); keep the two in sync. @@ -39,13 +39,13 @@ void main() { delegate: _MainWindowDelegate(), ); runWidget( - RegularWindow(controller: controller, child: const FlutterSceneEditorApp()), + Window(controller: controller, child: const FlutterSceneEditorApp()), ); } /// Quits the app when the main editor window closes, taking any floating /// panel windows with it. -class _MainWindowDelegate with RegularWindowControllerDelegate { +class _MainWindowDelegate with WindowControllerDelegate { @override void onWindowDestroyed() { exit(0); diff --git a/packages/flutter_scene_editor/lib/src/panels/outliner_panel.dart b/packages/flutter_scene_editor/lib/src/panels/outliner_panel.dart index dc4e8be4..80be0a5e 100644 --- a/packages/flutter_scene_editor/lib/src/panels/outliner_panel.dart +++ b/packages/flutter_scene_editor/lib/src/panels/outliner_panel.dart @@ -5,7 +5,6 @@ import 'package:scene/scene.dart'; // ignore: implementation_imports import 'package:flutter/material.dart'; // Not re-exported through material.dart on 3.47 stable. -import 'package:flutter/rendering.dart' show ScrollCacheExtent; import 'package:flutter/services.dart'; import '../controller/editor_controller.dart'; diff --git a/packages/flutter_scene_editor/lib/src/shell/docking_shell.dart b/packages/flutter_scene_editor/lib/src/shell/docking_shell.dart index b24e6726..c3c18d4b 100644 --- a/packages/flutter_scene_editor/lib/src/shell/docking_shell.dart +++ b/packages/flutter_scene_editor/lib/src/shell/docking_shell.dart @@ -81,7 +81,7 @@ class _DockingShellState extends State { // One native window per floating panel, keyed by panel id and kept in sync // with the layout's floating list. - final Map _floatControllers = {}; + final Map _floatControllers = {}; @override void initState() { @@ -139,7 +139,7 @@ class _DockingShellState extends State { for (final id in _layout.floating) { _floatControllers.putIfAbsent( id, - () => RegularWindowController( + () => WindowController( size: const Size(480, 640), title: _panelById(id)?.title ?? id, delegate: _FloatWindowDelegate(() => _redock(id)), @@ -168,7 +168,7 @@ class _DockingShellState extends State { views: [ for (final id in _layout.floating) if (_floatControllers[id] != null) - RegularWindow( + Window( controller: _floatControllers[id]!, child: _FloatWindowScaffold( theme: theme, @@ -226,13 +226,13 @@ class _DockingShellState extends State { /// Re-docks the panel instead of destroying the window outright when the user /// clicks the native close button; the shell then tears the window down. -class _FloatWindowDelegate with RegularWindowControllerDelegate { +class _FloatWindowDelegate with WindowControllerDelegate { _FloatWindowDelegate(this.onCloseRequested); final VoidCallback onCloseRequested; @override - void onWindowCloseRequested(RegularWindowController controller) { + void onWindowCloseRequested(WindowController controller) { onCloseRequested(); } }