@@ -21,6 +21,15 @@ import 'media_query.dart';
21
21
/// The provided [child] is wrapped in a [MediaQuery] constructed from the given
22
22
/// [view] .
23
23
///
24
+ /// For most use cases, using [MediaQuery.of] is a more appropriate way of
25
+ /// obtaining the information that a [FlutterView] exposes. For example, using
26
+ /// [MediaQuery] will expose the _logical_ device size ([MediaQueryData.size] )
27
+ /// rather than the physical size ([FlutterView.physicalSize] ). Similarly, while
28
+ /// [FlutterView.padding] conveys the information from the operating system, the
29
+ /// [MediaQueryData.padding] further adjusts this information to be aware of the
30
+ /// context of the widget; e.g. the [Scaffold] widget adjusts the values for its
31
+ /// various children.
32
+ ///
24
33
/// Each [FlutterView] can be associated with at most one [View] widget in the
25
34
/// widget tree. Two or more [View] widgets configured with the same
26
35
/// [FlutterView] must never exist within the same widget tree at the same time.
@@ -93,7 +102,7 @@ class View extends StatelessWidget {
93
102
/// The method creates a dependency on the `context` , which will be informed
94
103
/// when the identity of the [FlutterView] changes (i.e. the `context` is
95
104
/// moved to render into a different [FlutterView] then before). The context
96
- /// will not be informed when the properties on the [FlutterView] itself
105
+ /// will not be informed when the _properties_ on the [FlutterView] itself
97
106
/// change their values. To access the property values of a [FlutterView] it
98
107
/// is best practise to use [MediaQuery.maybeOf] instead, which will ensure
99
108
/// that the `context` is informed when the view properties change.
@@ -113,7 +122,7 @@ class View extends StatelessWidget {
113
122
/// The method creates a dependency on the `context` , which will be informed
114
123
/// when the identity of the [FlutterView] changes (i.e. the `context` is
115
124
/// moved to render into a different [FlutterView] then before). The context
116
- /// will not be informed when the properties on the [FlutterView] itself
125
+ /// will not be informed when the _properties_ on the [FlutterView] itself
117
126
/// change their values. To access the property values of a [FlutterView] it
118
127
/// is best practise to use [MediaQuery.of] instead, which will ensure that
119
128
/// the `context` is informed when the view properties change.
0 commit comments