From 2898768dde792d2b09aa3511e848e8cd07061708 Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Mon, 27 Jun 2016 14:42:25 -0700 Subject: [PATCH] Add some missing docs (#4772) These docs complete the dartdocs for their respective libraries. --- packages/flutter/lib/src/cassowary/solver.dart | 7 +++++++ packages/flutter_sprites/lib/src/sprite_box.dart | 1 + packages/flutter_sprites/lib/src/textured_line.dart | 1 + packages/flutter_test/lib/src/controller.dart | 2 ++ 4 files changed, 11 insertions(+) diff --git a/packages/flutter/lib/src/cassowary/solver.dart b/packages/flutter/lib/src/cassowary/solver.dart index 4da09c3c88..305ca84e78 100644 --- a/packages/flutter/lib/src/cassowary/solver.dart +++ b/packages/flutter/lib/src/cassowary/solver.dart @@ -145,6 +145,10 @@ class _Row { } } +/// Solves cassowary constraints. +/// +/// Typically clients will create a solver, [addConstraints], and then call +/// [flushUpdates] to actually solve the constraints. class Solver { final Map _constraints = new Map(); final Map<_Symbol, _Row> _rows = new Map<_Symbol, _Row>(); @@ -153,6 +157,9 @@ class Solver { final List<_Symbol> _infeasibleRows = new List<_Symbol>(); final _Row _objective = new _Row(0.0); _Row _artificial = new _Row(0.0); + + /// A monotonically increasing value that indicates how many times the solver + /// has iterated. int tick = 1; /// Attempts to add the constraints in the list to the solver. If it cannot diff --git a/packages/flutter_sprites/lib/src/sprite_box.dart b/packages/flutter_sprites/lib/src/sprite_box.dart index 038e6954fe..bba4789cbe 100644 --- a/packages/flutter_sprites/lib/src/sprite_box.dart +++ b/packages/flutter_sprites/lib/src/sprite_box.dart @@ -85,6 +85,7 @@ class SpriteBox extends RenderBox { Duration _lastTimeStamp; double _frameRate = 0.0; + /// An instantaneous estimate of the number of frames per second this sprite box is producing. double get frameRate => _frameRate; // Transformation mode diff --git a/packages/flutter_sprites/lib/src/textured_line.dart b/packages/flutter_sprites/lib/src/textured_line.dart index 78b91421a9..92c0736fad 100644 --- a/packages/flutter_sprites/lib/src/textured_line.dart +++ b/packages/flutter_sprites/lib/src/textured_line.dart @@ -25,6 +25,7 @@ class TexturedLine extends Node { /// Draws a polyline to a [Canvas] from a list of points using the provided [Texture]. class TexturedLinePainter { + /// Creates a painter that draws a polyline with a texture. TexturedLinePainter(this._points, this.colors, this.widths, [Texture texture, this.textureStops]) { this.texture = texture; } diff --git a/packages/flutter_test/lib/src/controller.dart b/packages/flutter_test/lib/src/controller.dart index 28dd6457c6..7899c44215 100644 --- a/packages/flutter_test/lib/src/controller.dart +++ b/packages/flutter_test/lib/src/controller.dart @@ -17,8 +17,10 @@ import 'test_pointer.dart'; /// /// For a variant of this class suited specifically for unit tests, see [WidgetTester]. class WidgetController { + /// Creates a widget controller that uses the given binding. WidgetController(this.binding); + /// A reference to the current instance of the binding. final WidgetsBinding binding; // FINDER API