diff --git a/packages/flutter/lib/src/animation/tween.dart b/packages/flutter/lib/src/animation/tween.dart index adaf747d5e..32cb20fed1 100644 --- a/packages/flutter/lib/src/animation/tween.dart +++ b/packages/flutter/lib/src/animation/tween.dart @@ -246,7 +246,7 @@ class Tween extends Animatable { /// Returns the value this variable has at the given animation clock value. /// - /// The default implementation of this method uses the [+], [-], and [*] + /// The default implementation of this method uses the `+`, `-`, and `*` /// operators on `T`. The [begin] and [end] properties must therefore be /// non-null by the time this method is called. /// diff --git a/packages/flutter/lib/src/cupertino/search_field.dart b/packages/flutter/lib/src/cupertino/search_field.dart index 420f566a7d..d39bfa9d6e 100644 --- a/packages/flutter/lib/src/cupertino/search_field.dart +++ b/packages/flutter/lib/src/cupertino/search_field.dart @@ -108,7 +108,7 @@ class CupertinoSearchTextField extends StatefulWidget { /// /// The [itemColor] and [itemSize] properties allow changing the icon color /// and icon size of the search icon (prefix) and X-Mark (suffix). - /// They default to [CupertinoColors.secondaryLabel] and [20.0]. + /// They default to [CupertinoColors.secondaryLabel] and `20.0`. /// /// The [padding], [prefixInsets], and [suffixInsets] let you set the padding /// insets for text, the search icon (prefix), and the X-Mark icon (suffix). @@ -240,7 +240,7 @@ class CupertinoSearchTextField extends StatefulWidget { /// Sets the base icon size for the suffix and prefix icons. /// /// Cannot be null. The size of the icon is scaled using the accessibility - /// font scale settings. Defaults to [20.0]. + /// font scale settings. Defaults to `20.0`. final double itemSize; /// Sets the padding insets for the suffix. diff --git a/packages/flutter/lib/src/foundation/debug.dart b/packages/flutter/lib/src/foundation/debug.dart index 22cbabe3e6..66251f29c4 100644 --- a/packages/flutter/lib/src/foundation/debug.dart +++ b/packages/flutter/lib/src/foundation/debug.dart @@ -70,15 +70,16 @@ Future debugInstrumentAction(String description, Future Function() acti } } -/// Argument passed to [Timeline] events in order to cause those events to be -/// shown in the developer-centric version of the Observatory Timeline. +/// Argument passed to [dart:developer.Timeline] events in order to cause those +/// events to be shown in the developer-centric version of the Observatory +/// Timeline. /// /// Generally these indicate landmark events such as the build phase or layout. /// /// See also: /// -/// * [Timeline.startSync], which typically takes this value as its `arguments` -/// argument. +/// * [dart:developer.Timeline.startSync], which typically takes this value as +/// its `arguments` argument. const Map timelineArgumentsIndicatingLandmarkEvent = { 'mode': 'basic', }; diff --git a/packages/flutter/lib/src/gestures/force_press.dart b/packages/flutter/lib/src/gestures/force_press.dart index e9348c8b6b..c417eaa49d 100644 --- a/packages/flutter/lib/src/gestures/force_press.dart +++ b/packages/flutter/lib/src/gestures/force_press.dart @@ -79,7 +79,7 @@ typedef GestureForcePressUpdateCallback = void Function(ForcePressDetails detail typedef GestureForcePressEndCallback = void Function(ForcePressDetails details); /// Signature used by [ForcePressGestureRecognizer] for interpolating the raw -/// device pressure to a value in the range [0, 1] given the device's pressure +/// device pressure to a value in the range `[0, 1]` given the device's pressure /// min and pressure max. typedef GestureForceInterpolation = double Function(double pressureMin, double pressureMax, double pressure); diff --git a/packages/flutter/lib/src/gestures/scale.dart b/packages/flutter/lib/src/gestures/scale.dart index 95b228ee21..009c26e8a7 100644 --- a/packages/flutter/lib/src/gestures/scale.dart +++ b/packages/flutter/lib/src/gestures/scale.dart @@ -282,7 +282,7 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer { /// /// See also: /// - /// * [https://flutter.dev/docs/development/ui/advanced/gestures#gesture-disambiguation], + /// * https://flutter.dev/docs/development/ui/advanced/gestures#gesture-disambiguation, /// which provides more information about the gesture arena. DragStartBehavior dragStartBehavior; @@ -294,7 +294,7 @@ class ScaleGestureRecognizer extends OneSequenceGestureRecognizer { /// /// See also: /// - /// * [https://flutter.dev/docs/development/ui/advanced/gestures#gesture-disambiguation], + /// * https://flutter.dev/docs/development/ui/advanced/gestures#gesture-disambiguation, /// which provides more information about the gesture arena. GestureScaleStartCallback? onStart; diff --git a/packages/flutter/lib/src/material/banner.dart b/packages/flutter/lib/src/material/banner.dart index fd912d962d..61ddab2399 100644 --- a/packages/flutter/lib/src/material/banner.dart +++ b/packages/flutter/lib/src/material/banner.dart @@ -137,7 +137,7 @@ class MaterialBanner extends StatefulWidget { /// Creates a [MaterialBanner]. /// /// The [actions], [content], and [forceActionsBelow] must be non-null. - /// The [actions.length] must be greater than 0. + /// The [actions].length must be greater than 0. const MaterialBanner({ Key? key, required this.content, diff --git a/packages/flutter/lib/src/material/bottom_navigation_bar.dart b/packages/flutter/lib/src/material/bottom_navigation_bar.dart index 8026249545..b058e44c5b 100644 --- a/packages/flutter/lib/src/material/bottom_navigation_bar.dart +++ b/packages/flutter/lib/src/material/bottom_navigation_bar.dart @@ -231,7 +231,7 @@ class BottomNavigationBar extends StatefulWidget { /// The [iconSize], [selectedFontSize], [unselectedFontSize], and [elevation] /// arguments must be non-null and non-negative. /// - /// If [selectedLabelStyle.color] and [unselectedLabelStyle.color] values + /// If [selectedLabelStyle].color and [unselectedLabelStyle].color values /// are non-null, they will be used instead of [selectedItemColor] and /// [unselectedItemColor]. /// @@ -239,8 +239,8 @@ class BottomNavigationBar extends StatefulWidget { /// [selectedIconTheme] and [unselectedIconTheme], and both /// [IconThemeData.color] and [IconThemeData.size] must be set. /// - /// If both [selectedLabelStyle.fontSize] and [selectedFontSize] are set, - /// [selectedLabelStyle.fontSize] will be used. + /// If both [selectedLabelStyle].fontSize and [selectedFontSize] are set, + /// [selectedLabelStyle].fontSize will be used. /// /// Only one of [selectedItemColor] and [fixedColor] can be specified. The /// former is preferred, [fixedColor] only exists for the sake of diff --git a/packages/flutter/lib/src/material/colors.dart b/packages/flutter/lib/src/material/colors.dart index b0861f585d..71da21568e 100644 --- a/packages/flutter/lib/src/material/colors.dart +++ b/packages/flutter/lib/src/material/colors.dart @@ -307,8 +307,9 @@ class Colors { /// * [Typography.white], which uses this color for its text styles. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white70, white60, white54, white38, white30, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white70], [white60], [white54], [white38], [white30], [white12], + /// [white10], which are variants on this color but with different + /// opacities. /// * [black], a solid black color. /// * [transparent], a fully-transparent color. static const Color white = Color(0xFFFFFFFF); @@ -324,8 +325,9 @@ class Colors { /// * [Typography.white], which uses this color for its text styles. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white54, white38, white30, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white54], [white38], [white30], [white12], + /// [white10], which are variants on this color but with different + /// opacities. static const Color white70 = Color(0xB3FFFFFF); /// White with 60% opacity. @@ -340,8 +342,8 @@ class Colors { /// * [ExpandIcon], which uses this color for dark themes. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white54, white30, white38, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white54], [white30], [white38], [white12], [white10], which + /// are variants on this color but with different opacities. static const Color white60 = Color(0x99FFFFFF); /// White with 54% opacity. @@ -352,8 +354,8 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white38, white30, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white38], [white30], [white12], [white10], which + /// are variants on this color but with different opacities. static const Color white54 = Color(0x8AFFFFFF); /// White with 38% opacity. @@ -367,8 +369,9 @@ class Colors { /// * [ThemeData.disabledColor], which uses this color by default in dark themes. /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white54, white70, white30, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white54], [white70], [white30], [white12], + /// [white10], which are variants on this color but with different + /// opacities. static const Color white38 = Color(0x62FFFFFF); /// White with 30% opacity. @@ -379,8 +382,9 @@ class Colors { /// /// * [Theme.of], which allows you to select colors from the current theme /// rather than hard-coding colors in your build methods. - /// * [white, white60, white54, white70, white38, white12, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white54], [white70], [white38], [white12], + /// [white10], which are variants on this color but with different + /// opacities. static const Color white30 = Color(0x4DFFFFFF); /// White with 24% opacity. @@ -391,7 +395,8 @@ class Colors { /// /// See also: /// - /// * [white, white60, white54, white70, white38, white30, white10], which are variants on this color + /// * [white], [white60], [white54], [white70], [white38], [white30], + /// [white10], which are variants on this color /// but with different opacities. static const Color white24 = Color(0x3DFFFFFF); @@ -403,8 +408,9 @@ class Colors { /// /// See also: /// - /// * [white, white60, white54, white70, white38, white30, white10], which are variants on this color - /// but with different opacities. + /// * [white], [white60], [white54], [white70], [white38], [white30], + /// [white10], which are variants on this color but with different + /// opacities. static const Color white12 = Color(0x1FFFFFFF); /// White with 10% opacity. @@ -413,7 +419,8 @@ class Colors { /// /// See also: /// - /// * [white, white60, white54, white70, white38, white30, white12], which are variants on this color + /// * [white], [white60], [white54], [white70], [white38], [white30], + /// [white12], which are variants on this color /// but with different opacities. /// * [transparent], a fully-transparent color, not far from this one. static const Color white10 = Color(0x1AFFFFFF); diff --git a/packages/flutter/lib/src/material/navigation_rail.dart b/packages/flutter/lib/src/material/navigation_rail.dart index 2c34bab2a2..3d87a42ab3 100644 --- a/packages/flutter/lib/src/material/navigation_rail.dart +++ b/packages/flutter/lib/src/material/navigation_rail.dart @@ -32,7 +32,7 @@ import 'theme.dart'; /// Adaptive layouts can build different instances of the [Scaffold] in order to /// have a navigation rail for more horizontal layouts and a bottom navigation /// bar for more vertical layouts. See -/// [https://github.com/flutter/samples/blob/master/experimental/web_dashboard/lib/src/widgets/third_party/adaptive_scaffold.dart] +/// [the adaptive_scaffold.dart sample](https://github.com/flutter/samples/blob/master/experimental/web_dashboard/lib/src/widgets/third_party/adaptive_scaffold.dart) /// for an example. /// /// {@tool dartpad --template=stateful_widget_material} @@ -98,7 +98,7 @@ import 'theme.dart'; /// destinations in the navigation rail. /// * [BottomNavigationBar], which is a similar navigation widget that's laid /// out horizontally. -/// * [https://material.io/components/navigation-rail/] +/// * https://material.io/components/navigation-rail/ class NavigationRail extends StatefulWidget { /// Creates a material design navigation rail. /// diff --git a/packages/flutter/lib/src/material/range_slider.dart b/packages/flutter/lib/src/material/range_slider.dart index e2731dafcf..4f1814753d 100644 --- a/packages/flutter/lib/src/material/range_slider.dart +++ b/packages/flutter/lib/src/material/range_slider.dart @@ -150,8 +150,8 @@ class RangeSlider extends StatefulWidget { /// appearance is achieved using a [SliderThemeData]. /// /// The [values], [min], [max] must not be null. The [min] must be less than - /// or equal to the [max]. [values.start] must be less than or equal to - /// [values.end]. [values.start] and [values.end] must be greater than or + /// or equal to the [max]. [values].start must be less than or equal to + /// [values].end. [values].start and [values].end must be greater than or /// equal to the [min] and less than or equal to the [max]. The [divisions] /// must be null or greater than 0. RangeSlider({ diff --git a/packages/flutter/lib/src/material/selectable_text.dart b/packages/flutter/lib/src/material/selectable_text.dart index df8a7f64fc..b3069f7bc8 100644 --- a/packages/flutter/lib/src/material/selectable_text.dart +++ b/packages/flutter/lib/src/material/selectable_text.dart @@ -221,7 +221,7 @@ class SelectableText extends StatefulWidget { /// Creates a selectable text widget with a [TextSpan]. /// /// The [textSpan] parameter must not be null and only contain [TextSpan] in - /// [textSpan.children]. Other type of [InlineSpan] is not allowed. + /// [textSpan].children. Other type of [InlineSpan] is not allowed. /// /// The [autofocus] and [dragStartBehavior] arguments must not be null. const SelectableText.rich( diff --git a/packages/flutter/lib/src/material/text_field.dart b/packages/flutter/lib/src/material/text_field.dart index 1371191658..7fe5334a6c 100644 --- a/packages/flutter/lib/src/material/text_field.dart +++ b/packages/flutter/lib/src/material/text_field.dart @@ -313,7 +313,7 @@ class TextField extends StatefulWidget { /// /// If [maxLengthEnforced] is set to false, then more than [maxLength] /// characters may be entered, and the error counter and divider will - /// switch to the [decoration.errorStyle] when the limit is exceeded. + /// switch to the [decoration].errorStyle when the limit is exceeded. /// /// The text cursor is not shown if [showCursor] is false or if [showCursor] /// is null (the default) and [readOnly] is true. diff --git a/packages/flutter/lib/src/material/theme_data.dart b/packages/flutter/lib/src/material/theme_data.dart index c0771da6b6..ff95b27311 100644 --- a/packages/flutter/lib/src/material/theme_data.dart +++ b/packages/flutter/lib/src/material/theme_data.dart @@ -774,7 +774,7 @@ class ThemeData with Diagnosticable { /// /// The [colorScheme] can not be null. /// - /// If [colorScheme.brightness] is [Brightness.dark] then + /// If [colorScheme].brightness is [Brightness.dark] then /// [ThemeData.applyElevationOverlayColor] will be set to true to support /// the Material dark theme method for indicating elevation by applying /// a semi-transparent onSurface color on top of the surface color. diff --git a/packages/flutter/lib/src/material/tooltip.dart b/packages/flutter/lib/src/material/tooltip.dart index 22d06b46e4..1dca887a3c 100644 --- a/packages/flutter/lib/src/material/tooltip.dart +++ b/packages/flutter/lib/src/material/tooltip.dart @@ -174,7 +174,7 @@ class Tooltip extends StatefulWidget { /// /// The tooltip shape defaults to a rounded rectangle with a border radius of /// 4.0. Tooltips will also default to an opacity of 90% and with the color - /// [Colors.grey[700]] if [ThemeData.brightness] is [Brightness.dark], and + /// [Colors.grey]\[700\] if [ThemeData.brightness] is [Brightness.dark], and /// [Colors.white] if it is [Brightness.light]. final Decoration? decoration; diff --git a/packages/flutter/lib/src/painting/borders.dart b/packages/flutter/lib/src/painting/borders.dart index 9d72ec012a..df016a24d9 100644 --- a/packages/flutter/lib/src/painting/borders.dart +++ b/packages/flutter/lib/src/painting/borders.dart @@ -186,8 +186,8 @@ class BorderSide { } } - /// Whether the two given [BorderSide]s can be merged using [new - /// BorderSide.merge]. + /// Whether the two given [BorderSide]s can be merged using + /// [BorderSide.merge]. /// /// Two sides can be merged if one or both are zero-width with /// [BorderStyle.none], or if they both have the same color and style. diff --git a/packages/flutter/lib/src/rendering/list_wheel_viewport.dart b/packages/flutter/lib/src/rendering/list_wheel_viewport.dart index d60a2dd1f8..08f5240956 100644 --- a/packages/flutter/lib/src/rendering/list_wheel_viewport.dart +++ b/packages/flutter/lib/src/rendering/list_wheel_viewport.dart @@ -23,7 +23,8 @@ abstract class ListWheelChildManager { /// The maximum number of children that can be provided to /// [RenderListWheelViewport]. /// - /// If non-null, the children will have index in the range [0, childCount - 1]. + /// If non-null, the children will have index in the range + /// `[0, childCount - 1]`. /// /// If null, then there's no explicit limits to the range of the children /// except that it has to be contiguous. If [childExistsAt] for a certain @@ -329,9 +330,9 @@ class RenderListWheelViewport /// the center. So a value of `0.5` means the edges' vanishing line will touch /// the wheel's size's left edge. /// - /// Defaults to 0.0, which means looking at the wheel head-on. + /// Defaults to `0.0`, which means looking at the wheel head-on. /// The visual effect can be unaesthetic if this value is too far from the - /// range [-0.5, 0.5]. + /// range `[-0.5, 0.5]`. /// {@endtemplate} double get offAxisFraction => _offAxisFraction; double _offAxisFraction = 0.0; diff --git a/packages/flutter/lib/src/services/text_input.dart b/packages/flutter/lib/src/services/text_input.dart index 3f3ab6e844..a06f7e3e1f 100644 --- a/packages/flutter/lib/src/services/text_input.dart +++ b/packages/flutter/lib/src/services/text_input.dart @@ -887,10 +887,10 @@ abstract class TextInputClient { /// between certain input methods and their clients. /// /// See also: - /// * [https://developer.android.com/reference/android/view/inputmethod/InputConnection#performPrivateCommand(java.lang.String,%20android.os.Bundle)], + /// * [performPrivateCommand](https://developer.android.com/reference/android/view/inputmethod/InputConnection#performPrivateCommand\(java.lang.String,%20android.os.Bundle\)), /// which is the Android documentation for performPrivateCommand, used to /// send a command from the input method. - /// * [https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#sendAppPrivateCommand], + /// * [sendAppPrivateCommand](https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#sendAppPrivateCommand), /// which is the Android documentation for sendAppPrivateCommand, used to /// send a command to the input method. void performPrivateCommand(String action, Map data); diff --git a/packages/flutter/lib/src/widgets/editable_text.dart b/packages/flutter/lib/src/widgets/editable_text.dart index ace899900c..ab69ad14bc 100644 --- a/packages/flutter/lib/src/widgets/editable_text.dart +++ b/packages/flutter/lib/src/widgets/editable_text.dart @@ -1065,10 +1065,10 @@ class EditableText extends StatefulWidget { /// between certain input methods and their clients. /// /// See also: - /// * [https://developer.android.com/reference/android/view/inputmethod/InputConnection#performPrivateCommand(java.lang.String,%20android.os.Bundle)], + /// * [performPrivateCommand](https://developer.android.com/reference/android/view/inputmethod/InputConnection#performPrivateCommand\(java.lang.String,%20android.os.Bundle\)), /// which is the Android documentation for performPrivateCommand, used to /// send a command from the input method. - /// * [https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#sendAppPrivateCommand], + /// * [sendAppPrivateCommand](https://developer.android.com/reference/android/view/inputmethod/InputMethodManager#sendAppPrivateCommand), /// which is the Android documentation for sendAppPrivateCommand, used to /// send a command to the input method. /// {@endtemplate} diff --git a/packages/flutter/lib/src/widgets/navigator.dart b/packages/flutter/lib/src/widgets/navigator.dart index 78fc907b6f..fd0607edb2 100644 --- a/packages/flutter/lib/src/widgets/navigator.dart +++ b/packages/flutter/lib/src/widgets/navigator.dart @@ -933,20 +933,20 @@ abstract class TransitionDelegate { /// /// For example, consider the following case. /// - /// newPageRouteHistory = [A, B, C] + /// `newPageRouteHistory = [A, B, C]` /// - /// locationToExitingPageRoute = {A -> D, C -> E} + /// `locationToExitingPageRoute = {A -> D, C -> E}` /// /// The following outputs are valid. /// - /// result = [A, B ,C ,D ,E] is valid. - /// result = [D, A, B ,C ,E] is also valid because exiting route can be + /// `result = [A, B ,C ,D ,E]` is valid. + /// `result = [D, A, B ,C ,E]` is also valid because exiting route can be /// inserted in any place. /// /// The following outputs are invalid. /// - /// result = [B, A, C ,D ,E] is invalid because B must be after A. - /// result = [A, B, C ,E] is invalid because results must include D. + /// `result = [B, A, C ,D ,E]` is invalid because B must be after A. + /// `result = [A, B, C ,E]` is invalid because results must include D. /// /// See also: /// diff --git a/packages/flutter_test/lib/src/matchers.dart b/packages/flutter_test/lib/src/matchers.dart index 4addf8bde6..c2dbe5284d 100644 --- a/packages/flutter_test/lib/src/matchers.dart +++ b/packages/flutter_test/lib/src/matchers.dart @@ -265,12 +265,12 @@ Matcher offsetMoreOrLessEquals(Offset value, { double epsilon = precisionErrorTo /// Asserts that two [String]s are equal after normalizing likely hash codes. /// /// A `#` followed by 5 hexadecimal digits is assumed to be a short hash code -/// and is normalized to #00000. +/// and is normalized to `#00000`. /// /// See Also: /// /// * [describeIdentity], a method that generates short descriptions of objects -/// with ids that match the pattern #[0-9a-f]{5}. +/// with ids that match the pattern `#[0-9a-f]{5}`. /// * [shortHash], a method that generates a 5 character long hexadecimal /// [String] based on [Object.hashCode]. /// * [DiagnosticableTree.toStringDeep], a method that returns a [String]