Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions lib/web_ui/lib/src/engine/platform_dispatcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -130,24 +130,21 @@ class EnginePlatformDispatcher extends ui.PlatformDispatcher {
EngineFlutterDisplay.instance,
];

/// Adds [view] to the platform dispatcher's registry of [views].
void registerView(EngineFlutterView view) {
viewData[view.viewId] = view;
}

/// The current list of windows.
@override
Iterable<EngineFlutterView> get views => viewData.values;
final Map<int, EngineFlutterView> viewData = <int, EngineFlutterView>{};

/// Returns the [FlutterView] with the provided ID if one exists, or null
/// Returns the [EngineFlutterView] with the provided ID if one exists, or null
/// otherwise.
@override
EngineFlutterView? view({required int id}) => viewData[id];

/// A map of opaque platform window identifiers to window configurations.
///
/// This should be considered a protected member, only to be used by
/// [PlatformDispatcher] subclasses.
Map<Object, ViewConfiguration> get windowConfigurations => _windowConfigurations;
final Map<Object, ViewConfiguration> _windowConfigurations =
<Object, ViewConfiguration>{};

/// The [FlutterView] provided by the engine if the platform is unable to
/// create windows, or, for backwards compatibility.
///
Expand Down
Loading