Skip to content

Commit c9608e2

Browse files
authored
Implement framework interface for the dialog window archetype (flutter#176202)
## What's new? - 🍏 Added the concept of dialogs to the windowing API. New symbols: - `DialogWindowControllerDelegate` - `DialogWindowController` - `WindowingOwner.createDialogWindowController` - `DialogWindow` - `WindowControllerCommon` - 🥘 Introduced the `WindowControllerCommon` mixin to share common windowing functionality between controller types - I have NOT yet implemented dialogs. This pull request ONLY adds the idea to the API. Win32 implementation to follow :) ## Pre-launch Checklist - [x] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [x] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [x] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [x] I signed the [CLA]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I added new tests to check the change I am making, or this PR is [test-exempt]. - [x] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [x] All existing and new tests are passing.
1 parent bfde3e8 commit c9608e2

5 files changed

Lines changed: 822 additions & 35 deletions

File tree

examples/multiple_windows/lib/app/main_window.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,14 @@ class _WindowsTable extends StatelessWidget {
9696
context: context,
9797
controller: regular,
9898
),
99+
DialogWindowController() => throw UnimplementedError(),
99100
};
100101
}
101102

102103
static String _getWindowTypeName(BaseWindowController controller) {
103104
return switch (controller) {
104105
RegularWindowController() => 'Regular',
106+
DialogWindowController() => 'Dialog',
105107
};
106108
}
107109

examples/multiple_windows/lib/app/window_content.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class WindowContent extends StatelessWidget {
3333
controller: regular,
3434
child: MaterialApp(home: RegularWindowContent(window: regular)),
3535
),
36+
DialogWindowController() => throw UnimplementedError(),
3637
};
3738
}
3839
}

0 commit comments

Comments
 (0)