diff --git a/lib/ui/semantics.dart b/lib/ui/semantics.dart index cab175aeb7ece219718dec286c7ea82f4e2b78d0..7258042544cfd8ff5ab3d08154a775666d8fee74 100644 --- a/lib/ui/semantics.dart +++ b/lib/ui/semantics.dart @@ -186,7 +186,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 { /// system. /// /// The `transform` is a matrix that maps this node's coodinate system into - /// its parent's coordate system. + /// its parent's coordinate system. void updateNode({ int id, int flags, @@ -197,7 +197,7 @@ class SemanticsUpdateBuilder extends NativeFieldWrapperClass2 { Int32List children }) { if (transform.length != 16) - throw new ArgumentError("[transform] must have 16 entries."); + throw new ArgumentError('transform argument must have 16 entries.'); _updateNode(id, flags, actions, diff --git a/lib/ui/window.dart b/lib/ui/window.dart index d7f488d86cbf4724f8b64c5728b117ab7ad30fda..f0111814d277e2fcdc8154a0f0c80078763dc4e5 100644 --- a/lib/ui/window.dart +++ b/lib/ui/window.dart @@ -110,6 +110,16 @@ class Window { /// The number of device pixels for each logical pixel. This number might not /// be a power of two. Indeed, it might not even be an integer. For example, /// the Nexus 6 has a device pixel ratio of 3.5. + /// + /// Device pixels are also referred to as physical pixels. Logical pixels are + /// also referred to as device-independent or resolution-independent pixels. + /// + /// By definition, there are roughly 38 logical pixels per centimeter, or + /// about 96 logical pixels per inch, of the physical display. The value + /// returned by [devicePixelRatio] is ultimately obtained either from the + /// hardware itself, the device drivers, or a hard-coded value stored in the + /// operating system or firmware, and may be inaccurate, sometimes by a + /// significant margin. double get devicePixelRatio => _devicePixelRatio; double _devicePixelRatio = 1.0; @@ -127,7 +137,9 @@ class Window { WindowPadding _padding = WindowPadding.zero; /// A callback that is invoked whenever the [devicePixelRatio], - /// [physicalSize], or [padding] values change. + /// [physicalSize], or [padding] values change, for example when the device is + /// rotated or when the application is resized (e.g. when showing applications + /// side-by-side on Android). VoidCallback onMetricsChanged; /// The system-reported locale.