Trivial fixes to dart:ui docs. (flutter/engine#3689)

This commit is contained in:
Ian Hickson
2017-05-15 13:30:24 -07:00
committed by GitHub
parent cf8689ffa2
commit 7ac614e395
2 changed files with 15 additions and 3 deletions

View File

@@ -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,

View File

@@ -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.