fromWindow static method
- @Deprecated('Use MediaQuery.fromView instead. ' 'This constructor was deprecated in preparation for the upcoming multi-window support. ' 'This feature was deprecated after v3.7.0-32.0.pre.')
Deprecated. Use MediaQuery.fromView instead.
This constructor was operating on a single window assumption. In preparation for Flutter's upcoming multi-window support, it has been deprecated.
Replaced by MediaQuery.fromView, which requires specifying the FlutterView the MediaQuery is constructed for. The FlutterView can, for example, be obtained from the context via View.of or from PlatformDispatcher.views.
Implementation
@Deprecated(
'Use MediaQuery.fromView instead. '
'This constructor was deprecated in preparation for the upcoming multi-window support. '
'This feature was deprecated after v3.7.0-32.0.pre.'
)
static Widget fromWindow({
Key? key,
required Widget child,
}) {
return _MediaQueryFromView(
key: key,
view: WidgetsBinding.instance.window,
ignoreParentData: true,
child: child,
);
}