create static method
Create a new window with given key
.
If a window with the given key
already exists then the returned
MultiWindow will be linked to that window.
An optional size
can be passed. If none is given it will use the size of
the main window.
An optional title
can be passed. If none is given it will use the title
of the main window.
The alignment
can be used to position the created window on the screen.
If none is passed it will be centered on top of the window that will
create this window.
Implementation
static Future<MultiWindow> create(
String key, {
Size? size,
String? title,
Alignment? alignment,
}) async {
assert(!key.startsWith('-'), 'Keys cannot start with "-"');
_ensureInitialized();
await MultiWindowInterface.instance.create(
key,
size: size,
title: title,
alignment: alignment,
);
return MultiWindow._(key);
}