Minor docs updates (#64966)
This commit is contained in:
@@ -91,7 +91,7 @@ final DecorationTween _kGradientShadowTween = DecorationTween(
|
||||
/// See also:
|
||||
///
|
||||
/// * [MaterialRouteTransitionMixin], which is a mixin that provides
|
||||
/// platform-appropriate transitions for a [PageRoute]
|
||||
/// platform-appropriate transitions for a [PageRoute].
|
||||
/// * [CupertinoPageRoute], which is a [PageRoute] that leverages this mixin.
|
||||
mixin CupertinoRouteTransitionMixin<T> on PageRoute<T> {
|
||||
/// Builds the primary contents of the route.
|
||||
|
||||
@@ -21,6 +21,8 @@ import 'thumb_painter.dart';
|
||||
|
||||
/// An iOS-style slider.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=ufb4gIPDmEs}
|
||||
///
|
||||
/// Used to select from a range of values.
|
||||
///
|
||||
/// A slider can be used to select from either a continuous or a discrete set of
|
||||
|
||||
@@ -195,7 +195,7 @@ class CupertinoTabController extends ChangeNotifier {
|
||||
/// See also:
|
||||
///
|
||||
/// * [CupertinoTabBar], the bottom tab bar inserted in the scaffold.
|
||||
/// * [CupertinoTabController], the selection state of this widget
|
||||
/// * [CupertinoTabController], the selection state of this widget.
|
||||
/// * [CupertinoTabView], the typical root content of each tab that holds its own
|
||||
/// [Navigator] stack.
|
||||
/// * [CupertinoPageRoute], a route hosting modal pages with iOS style transitions.
|
||||
|
||||
@@ -212,7 +212,8 @@ class CupertinoTextField extends StatefulWidget {
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [minLines]
|
||||
/// * [minLines], which is the minimum number of lines to occupy when the
|
||||
/// content spans fewer lines.
|
||||
/// * [expands], to allow the widget to size itself to its parent's height.
|
||||
/// * [maxLength], which discusses the precise meaning of "number of
|
||||
/// characters" and how it may differ from the intuitive meaning.
|
||||
|
||||
@@ -378,7 +378,7 @@ class ErrorSpacer extends DiagnosticsProperty<void> {
|
||||
/// See also:
|
||||
///
|
||||
/// * [FlutterError.onError], which is called whenever the Flutter framework
|
||||
/// catches an error
|
||||
/// catches an error.
|
||||
class FlutterErrorDetails with Diagnosticable {
|
||||
/// Creates a [FlutterErrorDetails] object with the given arguments setting
|
||||
/// the object's properties.
|
||||
@@ -893,10 +893,10 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti
|
||||
/// ```dart
|
||||
/// FlutterError.demangleStackTrace = (StackTrace stackTrace) {
|
||||
/// if (stack is stack_trace.Trace)
|
||||
// return stack.vmTrace;
|
||||
// if (stack is stack_trace.Chain)
|
||||
// return stack.toTrace().vmTrace;
|
||||
// return stack;
|
||||
/// return stack.vmTrace;
|
||||
/// if (stack is stack_trace.Chain)
|
||||
/// return stack.toTrace().vmTrace;
|
||||
/// return stack;
|
||||
/// };
|
||||
/// ```
|
||||
static StackTraceDemangler demangleStackTrace = (StackTrace stackTrace) => stackTrace;
|
||||
|
||||
@@ -1542,7 +1542,8 @@ abstract class DiagnosticsNode {
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [getProperties]
|
||||
/// * [getProperties], which returns the properties of the [DiagnosticsNode]
|
||||
/// object.
|
||||
List<DiagnosticsNode> getChildren();
|
||||
|
||||
String get _separator => showSeparator ? ':' : '';
|
||||
|
||||
@@ -109,7 +109,7 @@ class LongPressMoveUpdateDetails {
|
||||
/// See also:
|
||||
///
|
||||
/// * [LongPressGestureRecognizer.onLongPressEnd], which uses [GestureLongPressEndCallback].
|
||||
/// * [LongPressMoveUpdateDetails], the details for [GestureLongPressMoveUpdateCallback]
|
||||
/// * [LongPressMoveUpdateDetails], the details for [GestureLongPressMoveUpdateCallback].
|
||||
/// * [LongPressStartDetails], the details for [GestureLongPressStartCallback].
|
||||
class LongPressEndDetails {
|
||||
/// Creates the details for a [GestureLongPressEndCallback].
|
||||
|
||||
@@ -23,7 +23,7 @@ import 'package:flutter/rendering.dart';
|
||||
/// * [MaterialStateColor], a [Color] that implements `MaterialStateProperty`
|
||||
/// which is used in APIs that need to accept either a [Color] or a
|
||||
/// `MaterialStateProperty<Color>`.
|
||||
/// * [MaterialStateMouseCursor], a [MouseCursor] that implements `MaterialStateProperty`.
|
||||
/// * [MaterialStateMouseCursor], a [MouseCursor] that implements `MaterialStateProperty`
|
||||
/// which is used in APIs that need to accept either a [MouseCursor] or a
|
||||
/// [MaterialStateProperty<MouseCursor>].
|
||||
|
||||
@@ -339,7 +339,7 @@ class _EnabledAndDisabledMouseCursor extends MaterialStateMouseCursor {
|
||||
/// * [MaterialStateColor], a [Color] that implements `MaterialStateProperty`
|
||||
/// which is used in APIs that need to accept either a [Color] or a
|
||||
/// `MaterialStateProperty<Color>`.
|
||||
/// * [MaterialStateMouseCursor], a [MouseCursor] that implements `MaterialStateProperty`.
|
||||
/// * [MaterialStateMouseCursor], a [MouseCursor] that implements `MaterialStateProperty`
|
||||
/// which is used in APIs that need to accept either a [MouseCursor] or a
|
||||
/// [MaterialStateProperty<MouseCursor>].
|
||||
abstract class MaterialStateProperty<T> {
|
||||
|
||||
@@ -194,7 +194,7 @@ class _ZoomPageTransition extends StatelessWidget {
|
||||
/// See also:
|
||||
///
|
||||
/// * [TransitionRoute.secondaryAnimation], which is the value given to this
|
||||
// property when the [_ZoomPageTransition] is used as a page transition.
|
||||
/// property when the [_ZoomPageTransition] is used as a page transition.
|
||||
final Animation<double> secondaryAnimation;
|
||||
|
||||
/// The widget below this widget in the tree.
|
||||
|
||||
@@ -33,6 +33,8 @@ typedef PaintRangeValueIndicator = void Function(PaintingContext context, Offset
|
||||
///
|
||||
/// Used to select a range from a range of values.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=ufb4gIPDmEs}
|
||||
///
|
||||
/// {@tool dartpad --template=stateful_widget_scaffold}
|
||||
///
|
||||
/// ![A range slider widget, consisting of 5 divisions and showing the default
|
||||
|
||||
@@ -39,6 +39,8 @@ enum _SliderType { material, adaptive }
|
||||
///
|
||||
/// Used to select from a range of values.
|
||||
///
|
||||
/// {@youtube 560 315 https://www.youtube.com/watch?v=ufb4gIPDmEs}
|
||||
///
|
||||
/// {@tool dartpad --template=stateful_widget_scaffold}
|
||||
///
|
||||
/// ![A slider widget, consisting of 5 divisions and showing the default value
|
||||
|
||||
@@ -91,7 +91,7 @@ class RenderErrorBox extends RenderBox {
|
||||
/// See also:
|
||||
///
|
||||
/// * [minimumWidth], which controls how wide the box must be before the
|
||||
// horizontal padding is applied.
|
||||
/// horizontal padding is applied.
|
||||
static EdgeInsets padding = const EdgeInsets.fromLTRB(64.0, 96.0, 64.0, 12.0);
|
||||
|
||||
/// The width below which the horizontal padding is not applied.
|
||||
|
||||
@@ -3489,9 +3489,9 @@ abstract class _InterestingSemanticsFragment extends _SemanticsFragment {
|
||||
/// * [SemanticsNode.parentSemanticsClipRect] for the source and definition
|
||||
/// of the `parentSemanticsClipRect` argument.
|
||||
/// * [SemanticsNode.parentPaintClipRect] for the source and definition
|
||||
// of the `parentPaintClipRect` argument.
|
||||
/// of the `parentPaintClipRect` argument.
|
||||
/// * [SemanticsNode.elevationAdjustment] for the source and definition
|
||||
// of the `elevationAdjustment` argument.
|
||||
/// of the `elevationAdjustment` argument.
|
||||
void compileChildren({
|
||||
required Rect? parentSemanticsClipRect,
|
||||
required Rect? parentPaintClipRect,
|
||||
|
||||
@@ -356,7 +356,7 @@ class LengthLimitingTextInputFormatter extends TextInputFormatter {
|
||||
///
|
||||
/// See also:
|
||||
/// * [Dart's characters package](https://pub.dev/packages/characters).
|
||||
/// * [Dart's documenetation on runes and grapheme clusters](https://dart.dev/guides/language/language-tour#runes-and-grapheme-clusters).
|
||||
/// * [Dart's documentation on runes and grapheme clusters](https://dart.dev/guides/language/language-tour#runes-and-grapheme-clusters).
|
||||
@visibleForTesting
|
||||
static TextEditingValue truncate(TextEditingValue value, int maxLength) {
|
||||
final CharacterRange iterator = CharacterRange(value.text);
|
||||
|
||||
@@ -564,7 +564,7 @@ class EditableText extends StatefulWidget {
|
||||
///
|
||||
/// See also:
|
||||
///
|
||||
/// * [showCursor], which controls the visibility of the cursor..
|
||||
/// * [showCursor], which controls the visibility of the cursor.
|
||||
final bool showSelectionHandles;
|
||||
|
||||
/// {@template flutter.widgets.editableText.showCursor}
|
||||
|
||||
@@ -669,7 +669,7 @@ class BouncingScrollPhysics extends ScrollPhysics {
|
||||
/// glow color is specified to use [ThemeData.accentColor].
|
||||
class ClampingScrollPhysics extends ScrollPhysics {
|
||||
/// Creates scroll physics that prevent the scroll offset from exceeding the
|
||||
/// bounds of the content..
|
||||
/// bounds of the content.
|
||||
const ClampingScrollPhysics({ ScrollPhysics? parent }) : super(parent: parent);
|
||||
|
||||
@override
|
||||
|
||||
@@ -92,7 +92,7 @@ void main() {
|
||||
tabController.animateTo(1, duration: const Duration(milliseconds: 200));
|
||||
await tester.pump();
|
||||
// Verify that indicator 0's color is becoming increasingly transparent,
|
||||
/// and indicator 1's color is becoming increasingly opaque during the
|
||||
// and indicator 1's color is becoming increasingly opaque during the
|
||||
// 200ms animation. Indicator 2 remains transparent throughout.
|
||||
await tester.pump(const Duration(milliseconds: 10));
|
||||
List<Color> colors = indicatorColors(tester);
|
||||
|
||||
Reference in New Issue
Block a user