Commit 30d47369 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Random dartdoc fixes (#9745)

parent 87d0010a
...@@ -165,9 +165,9 @@ class AnimationController extends Animation<double> ...@@ -165,9 +165,9 @@ class AnimationController extends Animation<double>
/// identifying animation controller instances in debug output. /// identifying animation controller instances in debug output.
final String debugLabel; final String debugLabel;
/// Returns an [Animated<double>] for this animation controller, /// Returns an [Animation<double>] for this animation controller, so that a
/// so that a pointer to this object can be passed around without /// pointer to this object can be passed around without allowing users of that
/// allowing users of that pointer to mutate the AnimationController state. /// pointer to mutate the [AnimationController] state.
Animation<double> get view => this; Animation<double> get view => this;
/// The length of time this animation should last. /// The length of time this animation should last.
......
...@@ -73,20 +73,30 @@ class SawTooth extends Curve { ...@@ -73,20 +73,30 @@ class SawTooth extends Curve {
} }
} }
/// A curve that is 0.0 until [start], then curved from 0.0 to 1.0 at [end], then 1.0. /// A curve that is 0.0 until [begin], then curved (according to [curve] from
/// 0.0 to 1.0 at [end], then 1.0.
///
/// An [Interval] can be used to delay an animation. For example, a six second
/// animation that uses an [Interval] with its [begin] set to 0.5 and its [end]
/// set to 1.0 will essentially become a three-second animation that starts
/// three seconds later.
class Interval extends Curve { class Interval extends Curve {
/// Creates an interval curve. /// Creates an interval curve.
/// ///
/// The [start] and [end] arguments must not be null. /// The arguments must not be null.
const Interval(this.begin, this.end, { this.curve: Curves.linear }); const Interval(this.begin, this.end, { this.curve: Curves.linear });
/// The smallest value for which this interval is 0.0. /// The largest value for which this interval is 0.0.
///
/// From t=0.0 to t=`begin`, the interval's value is 0.0.
final double begin; final double begin;
/// The smallest value for which this interval is 1.0. /// The smallest value for which this interval is 1.0.
///
/// From t=`end` to t=1.0, the interval's value is 1.0.
final double end; final double end;
/// The curve to apply between [start] and [end]. /// The curve to apply between [begin] and [end].
final Curve curve; final Curve curve;
@override @override
......
...@@ -100,8 +100,6 @@ class CupertinoSlider extends StatefulWidget { ...@@ -100,8 +100,6 @@ class CupertinoSlider extends StatefulWidget {
/// The number of discrete divisions. /// The number of discrete divisions.
/// ///
/// Typically used with [label] to show the current discrete value.
///
/// If null, the slider is continuous. /// If null, the slider is continuous.
final int divisions; final int divisions;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
import 'basic_types.dart'; import 'basic_types.dart';
import 'print.dart'; import 'print.dart';
/// Signature for [FlutterError.onException] handler. /// Signature for [FlutterError.onError] handler.
typedef void FlutterExceptionHandler(FlutterErrorDetails details); typedef void FlutterExceptionHandler(FlutterErrorDetails details);
/// Signature for [FlutterErrorDetails.informationCollector] callback /// Signature for [FlutterErrorDetails.informationCollector] callback
......
...@@ -838,8 +838,6 @@ class SliverAppBar extends StatefulWidget { ...@@ -838,8 +838,6 @@ class SliverAppBar extends StatefulWidget {
/// ///
/// This does not include the status bar height (which will be automatically /// This does not include the status bar height (which will be automatically
/// included if [primary] is true). /// included if [primary] is true).
///
/// See also [AppBar.getExpandedHeightFor].
final double expandedHeight; final double expandedHeight;
/// Whether the app bar should become visible as soon as the user scrolls /// Whether the app bar should become visible as soon as the user scrolls
......
...@@ -25,9 +25,9 @@ import 'toggleable.dart'; ...@@ -25,9 +25,9 @@ import 'toggleable.dart';
/// ///
/// See also: /// See also:
/// ///
/// * [Radio] /// * [Switch], another widget with similar semantics.
/// * [Switch] /// * [Radio], for selecting among a set of explicit values.
/// * [Slider] /// * [Slider], for selecting a value in a range.
/// * <https://material.google.com/components/selection-controls.html#selection-controls-checkbox> /// * <https://material.google.com/components/selection-controls.html#selection-controls-checkbox>
/// * <https://material.google.com/components/lists-controls.html#lists-controls-types-of-list-controls> /// * <https://material.google.com/components/lists-controls.html#lists-controls-types-of-list-controls>
class Checkbox extends StatefulWidget { class Checkbox extends StatefulWidget {
......
...@@ -172,7 +172,7 @@ const _DayPickerGridDelegate _kDayPickerGridDelegate = const _DayPickerGridDeleg ...@@ -172,7 +172,7 @@ const _DayPickerGridDelegate _kDayPickerGridDelegate = const _DayPickerGridDeleg
class DayPicker extends StatelessWidget { class DayPicker extends StatelessWidget {
/// Creates a day picker. /// Creates a day picker.
/// ///
/// Rarely used directly. Instead, typically used as part of a [DatePicker]. /// Rarely used directly. Instead, typically used as part of a [MonthPicker].
DayPicker({ DayPicker({
Key key, Key key,
@required this.selectedDate, @required this.selectedDate,
...@@ -323,7 +323,8 @@ class DayPicker extends StatelessWidget { ...@@ -323,7 +323,8 @@ class DayPicker extends StatelessWidget {
class MonthPicker extends StatefulWidget { class MonthPicker extends StatefulWidget {
/// Creates a month picker. /// Creates a month picker.
/// ///
/// Rarely used directly. Instead, typically used as part of a [DatePicker]. /// Rarely used directly. Instead, typically used as part of the dialog shown
/// by [showDatePicker].
MonthPicker({ MonthPicker({
Key key, Key key,
@required this.selectedDate, @required this.selectedDate,
...@@ -511,7 +512,8 @@ class YearPicker extends StatefulWidget { ...@@ -511,7 +512,8 @@ class YearPicker extends StatefulWidget {
/// The [selectedDate] and [onChanged] arguments must not be null. The /// The [selectedDate] and [onChanged] arguments must not be null. The
/// [lastDate] must be after the [firstDate]. /// [lastDate] must be after the [firstDate].
/// ///
/// Rarely used directly. Instead, typically used as part of a [DatePicker]. /// Rarely used directly. Instead, typically used as part of the dialog shown
/// by [showDatePicker].
YearPicker({ YearPicker({
Key key, Key key,
@required this.selectedDate, @required this.selectedDate,
...@@ -687,7 +689,6 @@ class _DatePickerDialogState extends State<_DatePickerDialog> { ...@@ -687,7 +689,6 @@ class _DatePickerDialogState extends State<_DatePickerDialog> {
], ],
), ),
); );
return new Dialog( return new Dialog(
child: new OrientationBuilder( child: new OrientationBuilder(
builder: (BuildContext context, Orientation orientation) { builder: (BuildContext context, Orientation orientation) {
......
...@@ -44,7 +44,7 @@ class FlexibleSpaceBar extends StatefulWidget { ...@@ -44,7 +44,7 @@ class FlexibleSpaceBar extends StatefulWidget {
/// Shown behind the [title] when expanded. /// Shown behind the [title] when expanded.
/// ///
/// Typically an [AssetImage] widget with [AssetImage.fit] set to [BoxFit.cover]. /// Typically an [Image] widget with [Image.fit] set to [BoxFit.cover].
final Widget background; final Widget background;
/// Whether the title should be centered. /// Whether the title should be centered.
......
...@@ -31,9 +31,8 @@ const double _kInnerRadius = 5.0; ...@@ -31,9 +31,8 @@ const double _kInnerRadius = 5.0;
/// ///
/// See also: /// See also:
/// ///
/// * [CheckBox] /// * [Slider], for selecting a value in a range.
/// * [Slider] /// * [Checkbox] and [Switch], for toggling a particular value on or off.
/// * [Switch]
/// * <https://material.google.com/components/selection-controls.html#selection-controls-radio-button> /// * <https://material.google.com/components/selection-controls.html#selection-controls-radio-button>
class Radio<T> extends StatefulWidget { class Radio<T> extends StatefulWidget {
/// Creates a material design radio button. /// Creates a material design radio button.
......
...@@ -35,9 +35,8 @@ import 'typography.dart'; ...@@ -35,9 +35,8 @@ import 'typography.dart';
/// ///
/// See also: /// See also:
/// ///
/// * [CheckBox] /// * [Radio], for selecting among a set of explicit values.
/// * [Radio] /// * [Checkbox] and [Switch], for toggling a particular value on or off.
/// * [Switch]
/// * <https://material.google.com/components/sliders.html> /// * <https://material.google.com/components/sliders.html>
class Slider extends StatefulWidget { class Slider extends StatefulWidget {
/// Creates a material design slider. /// Creates a material design slider.
......
...@@ -28,9 +28,9 @@ import 'toggleable.dart'; ...@@ -28,9 +28,9 @@ import 'toggleable.dart';
/// ///
/// See also: /// See also:
/// ///
/// * [CheckBox] /// * [Checkbox], another widget with similar semantics.
/// * [Radio] /// * [Radio], for selecting among a set of explicit values.
/// * [Slider] /// * [Slider], for selecting a value in a range.
/// * <https://material.google.com/components/selection-controls.html#selection-controls-switch> /// * <https://material.google.com/components/selection-controls.html#selection-controls-switch>
class Switch extends StatefulWidget { class Switch extends StatefulWidget {
/// Creates a material design switch. /// Creates a material design switch.
......
...@@ -111,7 +111,7 @@ class TextTheme { ...@@ -111,7 +111,7 @@ class TextTheme {
/// Very, very large text. /// Very, very large text.
/// ///
/// Used for the date in [DatePicker]. /// Used for the date in the dialog shown by [showDatePicker].
final TextStyle display3; final TextStyle display3;
/// Very large text. /// Very large text.
...@@ -120,10 +120,12 @@ class TextTheme { ...@@ -120,10 +120,12 @@ class TextTheme {
/// Large text. /// Large text.
final TextStyle display1; final TextStyle display1;
/// Used for large text in dialogs (e.g., the month and year in [DatePicker]). /// Used for large text in dialogs (e.g., the month and year in the dialog
/// shown by [showDatePicker]).
final TextStyle headline; final TextStyle headline;
/// Used for the primary text in app bars and dialogs (e.g., [AppBar.title] and [Dialog.title]). /// Used for the primary text in app bars and dialogs (e.g., [AppBar.title]
/// and [AlertDialog.title]).
final TextStyle title; final TextStyle title;
/// Used for the primary text in lists (e.g., [ListTile.title]). /// Used for the primary text in lists (e.g., [ListTile.title]).
......
...@@ -78,7 +78,7 @@ abstract class Decoration { ...@@ -78,7 +78,7 @@ abstract class Decoration {
/// ///
/// The `onChanged` argument configures [BoxPainter.onChanged]. It can be /// The `onChanged` argument configures [BoxPainter.onChanged]. It can be
/// omitted if there is no chance that the painter will change (for example, /// omitted if there is no chance that the painter will change (for example,
/// if it is a [BoxDecoration] with definitely no [BackgroundImage]). /// if it is a [BoxDecoration] with definitely no [DecorationImage]).
BoxPainter createBoxPainter([VoidCallback onChanged]); BoxPainter createBoxPainter([VoidCallback onChanged]);
/// Returns a string representation of this object. /// Returns a string representation of this object.
......
...@@ -22,7 +22,7 @@ class _DebugSize extends Size { ...@@ -22,7 +22,7 @@ class _DebugSize extends Size {
/// Immutable layout constraints for [RenderBox] layout. /// Immutable layout constraints for [RenderBox] layout.
/// ///
/// A size respects a BoxConstraints if, and only if, all of the following /// A size respects a [BoxConstraints] if, and only if, all of the following
/// relations hold: /// relations hold:
/// ///
/// * `minWidth <= size.width <= maxWidth` /// * `minWidth <= size.width <= maxWidth`
...@@ -343,7 +343,8 @@ class BoxConstraints extends Constraints { ...@@ -343,7 +343,8 @@ class BoxConstraints extends Constraints {
/// Linearly interpolate between two BoxConstraints. /// Linearly interpolate between two BoxConstraints.
/// ///
/// If either is null, this function interpolates from [BoxConstraints.zero]. /// If either is null, this function interpolates from a [BoxConstraints]
/// object whose fields are all set to 0.0.
static BoxConstraints lerp(BoxConstraints a, BoxConstraints b, double t) { static BoxConstraints lerp(BoxConstraints a, BoxConstraints b, double t) {
if (a == null && b == null) if (a == null && b == null)
return null; return null;
......
...@@ -18,8 +18,8 @@ export 'dart:ui' show SemanticsAction; ...@@ -18,8 +18,8 @@ export 'dart:ui' show SemanticsAction;
/// being tapped, etc. /// being tapped, etc.
/// ///
/// These handlers will only be called if the relevant flag is set /// These handlers will only be called if the relevant flag is set
/// (e.g. [handleSemanticTap]() will only be called if /// (e.g. [handleSemanticTap] will only be called if
/// [SemanticsNode.canBeTapped] is true, [handleSemanticScrollDown]() will only /// [SemanticsNode.canBeTapped] is true, [handleSemanticScrollDown] will only
/// be called if [SemanticsNode.canBeScrolledVertically] is true, etc). /// be called if [SemanticsNode.canBeScrolledVertically] is true, etc).
abstract class SemanticsActionHandler { // ignore: one_member_abstracts abstract class SemanticsActionHandler { // ignore: one_member_abstracts
/// Called when the object implementing this interface receives a /// Called when the object implementing this interface receives a
......
...@@ -34,7 +34,7 @@ enum ScrollDirection { ...@@ -34,7 +34,7 @@ enum ScrollDirection {
/// Returns the opposite of the given [ScrollDirection]. /// Returns the opposite of the given [ScrollDirection].
/// ///
/// Specifically, returns [AxisDirection.reverse] for [AxisDirection.forward] /// Specifically, returns [ScrollDirection.reverse] for [ScrollDirection.forward]
/// (and vice versa) and returns [ScrollDirection.idle] for /// (and vice versa) and returns [ScrollDirection.idle] for
/// [ScrollDirection.idle]. /// [ScrollDirection.idle].
ScrollDirection flipScrollDirection(ScrollDirection direction) { ScrollDirection flipScrollDirection(ScrollDirection direction) {
......
...@@ -17,7 +17,7 @@ import 'ticker_provider.dart'; ...@@ -17,7 +17,7 @@ import 'ticker_provider.dart';
/// Signature for the builder callback used by [AnimatedList]. /// Signature for the builder callback used by [AnimatedList].
typedef Widget AnimatedListItemBuilder(BuildContext context, int index, Animation<double> animation); typedef Widget AnimatedListItemBuilder(BuildContext context, int index, Animation<double> animation);
/// Signature for the builder callback used by [AnimatedList.remove]. /// Signature for the builder callback used by [AnimatedListState.removeItem].
typedef Widget AnimatedListRemovedItemBuilder(BuildContext context, Animation<double> animation); typedef Widget AnimatedListRemovedItemBuilder(BuildContext context, Animation<double> animation);
// The default insert/remove animation duration. // The default insert/remove animation duration.
...@@ -67,13 +67,13 @@ class AnimatedList extends StatefulWidget { ...@@ -67,13 +67,13 @@ class AnimatedList extends StatefulWidget {
/// List items are only built when they're scrolled into view. /// List items are only built when they're scrolled into view.
/// ///
/// The [AnimatedListItemBuilder] index parameter indicates the item's /// The [AnimatedListItemBuilder] index parameter indicates the item's
/// posiition in the list. The value of the index parameter will be between 0 and /// posiition in the list. The value of the index parameter will be between 0
/// [initialItemCount] plus the total number of items that have been inserted /// and [initialItemCount] plus the total number of items that have been
/// with [AnimatedListState.insertItem] and less the total number of items /// inserted with [AnimatedListState.insertItem] and less the total number of
/// that have been removed with [AnimatedList.removeItem]. /// items that have been removed with [AnimatedListState.removeItem].
/// ///
/// Implementations of this callback should assume that [AnimatedList.removeItem] /// Implementations of this callback should assume that
/// removes an item immediately. /// [AnimatedListState.removeItem] removes an item immediately.
final AnimatedListItemBuilder itemBuilder; final AnimatedListItemBuilder itemBuilder;
/// The number of items the list will start with. /// The number of items the list will start with.
......
...@@ -11,7 +11,7 @@ import 'framework.dart'; ...@@ -11,7 +11,7 @@ import 'framework.dart';
import 'text.dart'; import 'text.dart';
import 'ticker_provider.dart'; import 'ticker_provider.dart';
/// An interpolation between two [BoxConstraint]s. /// An interpolation between two [BoxConstraints].
class BoxConstraintsTween extends Tween<BoxConstraints> { class BoxConstraintsTween extends Tween<BoxConstraints> {
/// Creates a box constraints tween. /// Creates a box constraints tween.
/// ///
......
...@@ -397,7 +397,7 @@ class RelativePositionedTransition extends AnimatedWidget { ...@@ -397,7 +397,7 @@ class RelativePositionedTransition extends AnimatedWidget {
/// * [AnimatedContainer], a more full-featured container that also animates on /// * [AnimatedContainer], a more full-featured container that also animates on
/// decoration using an internal animation. /// decoration using an internal animation.
class DecoratedBoxTransition extends AnimatedWidget { class DecoratedBoxTransition extends AnimatedWidget {
/// Creates an animated [DecorationBox] whose [Decoration] animation updates /// Creates an animated [DecoratedBox] whose [Decoration] animation updates
/// the widget. /// the widget.
/// ///
/// The [decoration] and [position] cannot be null. /// The [decoration] and [position] cannot be null.
......
...@@ -7,10 +7,10 @@ import 'package:meta/meta.dart'; ...@@ -7,10 +7,10 @@ import 'package:meta/meta.dart';
import 'all_elements.dart'; import 'all_elements.dart';
/// Signature for [CommonFinders.byPredicate]. /// Signature for [CommonFinders.byWidgetPredicate].
typedef bool WidgetPredicate(Widget widget); typedef bool WidgetPredicate(Widget widget);
/// Signature for [CommonFinders.byElement]. /// Signature for [CommonFinders.byElementPredicate].
typedef bool ElementPredicate(Element element); typedef bool ElementPredicate(Element element);
/// Some frequently used widget [Finder]s. /// Some frequently used widget [Finder]s.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment