@@ -80,9 +80,8 @@ class RegularWindow extends StatefulWidget {
80
80
this .onDestroyed,
81
81
this .onError,
82
82
super .key,
83
- required Size preferredSize,
84
- required this .child})
85
- : _preferredSize = preferredSize;
83
+ required this .preferredSize,
84
+ required this .child});
86
85
87
86
/// Controller for this widget.
88
87
final RegularWindowController ? controller;
@@ -93,7 +92,8 @@ class RegularWindow extends StatefulWidget {
93
92
/// Called when an error is encountered during the creation of this widget.
94
93
final void Function (String ? )? onError;
95
94
96
- final Size _preferredSize;
95
+ /// Preferred size of the window.
96
+ final Size preferredSize;
97
97
98
98
/// The content rendered into this window.
99
99
final Widget child;
@@ -113,15 +113,15 @@ class _RegularWindowState extends State<RegularWindow> {
113
113
void initState () {
114
114
super .initState ();
115
115
final Future <WindowCreationResult > createRegularFuture =
116
- createRegular (size: widget._preferredSize );
116
+ createRegular (size: widget.preferredSize );
117
117
setState (() {
118
118
_future = createRegularFuture;
119
119
});
120
120
121
121
createRegularFuture.then ((WindowCreationResult metadata) async {
122
- _viewId = metadata.flView .viewId;
122
+ _viewId = metadata.view .viewId;
123
123
if (widget.controller != null ) {
124
- widget.controller! .view = metadata.flView ;
124
+ widget.controller! .view = metadata.view ;
125
125
widget.controller! .parentViewId = metadata.parent;
126
126
widget.controller! .size = metadata.size;
127
127
}
@@ -131,7 +131,7 @@ class _RegularWindowState extends State<RegularWindow> {
131
131
_WindowingAppContext .of (context);
132
132
assert (windowingAppContext != null );
133
133
_listener = _WindowListener (
134
- viewId: metadata.flView .viewId,
134
+ viewId: metadata.view .viewId,
135
135
onChanged: (_WindowChangeProperties properties) {
136
136
if (widget.controller == null ) {
137
137
return ;
@@ -165,7 +165,7 @@ class _RegularWindowState extends State<RegularWindow> {
165
165
}
166
166
167
167
// In the event that we're being disposed before we've been destroyed
168
- // we need to destroy ther window on our way out.
168
+ // we need to destroy the window on our way out.
169
169
if (! _hasBeenDestroyed && _viewId != null ) {
170
170
// In the event of an argument error, we do nothing. We assume that
171
171
// the window has been successfully destroyed somehow else.
@@ -189,9 +189,9 @@ class _RegularWindowState extends State<RegularWindow> {
189
189
}
190
190
191
191
return View (
192
- view: metadata.data! .flView ,
192
+ view: metadata.data! .view ,
193
193
child: WindowContext (
194
- viewId: metadata.data! .flView .viewId, child: widget.child));
194
+ viewId: metadata.data! .view .viewId, child: widget.child));
195
195
});
196
196
}
197
197
}
@@ -219,13 +219,13 @@ class WindowContext extends InheritedWidget {
219
219
class WindowCreationResult {
220
220
/// Creates a new window.
221
221
WindowCreationResult (
222
- {required this .flView ,
222
+ {required this .view ,
223
223
required this .archetype,
224
224
required this .size,
225
225
this .parent});
226
226
227
227
/// The view associated with the window.
228
- final FlutterView flView ;
228
+ final FlutterView view ;
229
229
230
230
/// The archetype of the window.
231
231
final WindowArchetype archetype;
@@ -271,7 +271,7 @@ Future<WindowCreationResult> _createWindow(
271
271
);
272
272
273
273
return WindowCreationResult (
274
- flView : flView,
274
+ view : flView,
275
275
archetype: archetype,
276
276
size: Size ((size[0 ]! as int ).toDouble (), (size[1 ]! as int ).toDouble ()),
277
277
parent: parentViewId);
0 commit comments