diff --git a/packages/flutter/lib/src/material/chip_theme.dart b/packages/flutter/lib/src/material/chip_theme.dart index 777439e889..38b636315a 100644 --- a/packages/flutter/lib/src/material/chip_theme.dart +++ b/packages/flutter/lib/src/material/chip_theme.dart @@ -360,17 +360,7 @@ class ChipThemeData extends Diagnosticable { /// /// The arguments must not be null. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static ChipThemeData lerp(ChipThemeData a, ChipThemeData b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/material/slider_theme.dart b/packages/flutter/lib/src/material/slider_theme.dart index 085cda8d7e..4560710ae7 100644 --- a/packages/flutter/lib/src/material/slider_theme.dart +++ b/packages/flutter/lib/src/material/slider_theme.dart @@ -391,17 +391,7 @@ class SliderThemeData extends Diagnosticable { /// /// The arguments must not be null. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static SliderThemeData lerp(SliderThemeData a, SliderThemeData b, double t) { assert(a != null); assert(b != null); diff --git a/packages/flutter/lib/src/material/tab_bar_theme.dart b/packages/flutter/lib/src/material/tab_bar_theme.dart index 8a6455ba08..eeec4e1179 100644 --- a/packages/flutter/lib/src/material/tab_bar_theme.dart +++ b/packages/flutter/lib/src/material/tab_bar_theme.dart @@ -61,6 +61,8 @@ class TabBarTheme extends Diagnosticable { /// Linearly interpolate between two tab bar themes. /// + /// The arguments must not be null. + /// /// {@macro flutter.material.themeData.lerp} static TabBarTheme lerp(TabBarTheme a, TabBarTheme b, double t) { assert(a != null); diff --git a/packages/flutter/lib/src/material/theme_data.dart b/packages/flutter/lib/src/material/theme_data.dart index ee10b0266a..2f99e5c610 100644 --- a/packages/flutter/lib/src/material/theme_data.dart +++ b/packages/flutter/lib/src/material/theme_data.dart @@ -730,8 +730,6 @@ class ThemeData extends Diagnosticable { /// Linearly interpolate between two themes. /// /// {@template flutter.material.themeData.lerp} - /// The arguments must not be null. - /// /// The `t` argument represents position on the timeline, with 0.0 meaning /// that the interpolation has not started, returning `a` (or something /// equivalent to `a`), 1.0 meaning that the interpolation has finished, diff --git a/packages/flutter/lib/src/material/typography.dart b/packages/flutter/lib/src/material/typography.dart index f8e69371e5..29349bdcc5 100644 --- a/packages/flutter/lib/src/material/typography.dart +++ b/packages/flutter/lib/src/material/typography.dart @@ -361,17 +361,7 @@ class TextTheme extends Diagnosticable { /// /// The arguments must not be null. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static TextTheme lerp(TextTheme a, TextTheme b, double t) { assert(a != null); assert(b != null); diff --git a/packages/flutter/lib/src/painting/alignment.dart b/packages/flutter/lib/src/painting/alignment.dart index efa2883b40..671855df36 100644 --- a/packages/flutter/lib/src/painting/alignment.dart +++ b/packages/flutter/lib/src/painting/alignment.dart @@ -85,17 +85,7 @@ abstract class AlignmentGeometry { /// representing a combination of both is returned. That object can be turned /// into a concrete [Alignment] using [resolve]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static AlignmentGeometry lerp(AlignmentGeometry a, AlignmentGeometry b, double t) { assert(t != null); if (a == null && b == null) @@ -334,17 +324,7 @@ class Alignment extends AlignmentGeometry { /// /// If either is null, this function interpolates from [Alignment.center]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static Alignment lerp(Alignment a, Alignment b, double t) { assert(t != null); if (a == null && b == null) @@ -525,17 +505,7 @@ class AlignmentDirectional extends AlignmentGeometry { /// /// If either is null, this function interpolates from [AlignmentDirectional.center]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static AlignmentDirectional lerp(AlignmentDirectional a, AlignmentDirectional b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/painting/border_radius.dart b/packages/flutter/lib/src/painting/border_radius.dart index ef244f91f1..ed16d30888 100644 --- a/packages/flutter/lib/src/painting/border_radius.dart +++ b/packages/flutter/lib/src/painting/border_radius.dart @@ -127,17 +127,7 @@ abstract class BorderRadiusGeometry { /// representing a combination of both is returned. That object can be turned /// into a concrete [BorderRadius] using [resolve]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static BorderRadiusGeometry lerp(BorderRadiusGeometry a, BorderRadiusGeometry b, double t) { assert(t != null); if (a == null && b == null) @@ -481,17 +471,7 @@ class BorderRadius extends BorderRadiusGeometry { /// /// If either is null, this function interpolates from [BorderRadius.zero]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static BorderRadius lerp(BorderRadius a, BorderRadius b, double t) { assert(t != null); if (a == null && b == null) @@ -708,17 +688,7 @@ class BorderRadiusDirectional extends BorderRadiusGeometry { /// /// If either is null, this function interpolates from [BorderRadiusDirectional.zero]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static BorderRadiusDirectional lerp(BorderRadiusDirectional a, BorderRadiusDirectional b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/painting/borders.dart b/packages/flutter/lib/src/painting/borders.dart index 99e61a54b7..8cf8181535 100644 --- a/packages/flutter/lib/src/painting/borders.dart +++ b/packages/flutter/lib/src/painting/borders.dart @@ -198,17 +198,7 @@ class BorderSide { /// /// The arguments must not be null. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static BorderSide lerp(BorderSide a, BorderSide b, double t) { assert(a != null); assert(b != null); @@ -414,17 +404,7 @@ abstract class ShapeBorder { /// function instead. If both return null, it returns `a` before `t=0.5` /// and `b` after `t=0.5`. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static ShapeBorder lerp(ShapeBorder a, ShapeBorder b, double t) { assert(t != null); ShapeBorder result; diff --git a/packages/flutter/lib/src/painting/box_border.dart b/packages/flutter/lib/src/painting/box_border.dart index 76daa9a238..82f7d29220 100644 --- a/packages/flutter/lib/src/painting/box_border.dart +++ b/packages/flutter/lib/src/painting/box_border.dart @@ -98,17 +98,7 @@ abstract class BoxBorder extends ShapeBorder { /// For a more flexible approach, consider [ShapeBorder.lerp], which would /// instead [add] the two sets of sides and interpolate them simultaneously. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static BoxBorder lerp(BoxBorder a, BoxBorder b, double t) { assert(t != null); if ((a is Border || a == null) && (b is Border || b == null)) @@ -431,17 +421,7 @@ class Border extends BoxBorder { /// If a border is null, it is treated as having four [BorderSide.none] /// borders. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static Border lerp(Border a, Border b, double t) { assert(t != null); if (a == null && b == null) @@ -731,17 +711,7 @@ class BorderDirectional extends BoxBorder { /// If a border is null, it is treated as having four [BorderSide.none] /// borders. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static BorderDirectional lerp(BorderDirectional a, BorderDirectional b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/painting/box_decoration.dart b/packages/flutter/lib/src/painting/box_decoration.dart index c3f0166579..e461f7b2df 100644 --- a/packages/flutter/lib/src/painting/box_decoration.dart +++ b/packages/flutter/lib/src/painting/box_decoration.dart @@ -216,17 +216,7 @@ class BoxDecoration extends Decoration { /// unmodified. Otherwise, the values are computed by interpolating the /// properties appropriately. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} /// /// See also: /// diff --git a/packages/flutter/lib/src/painting/box_shadow.dart b/packages/flutter/lib/src/painting/box_shadow.dart index dce0c53580..44d8e1e986 100644 --- a/packages/flutter/lib/src/painting/box_shadow.dart +++ b/packages/flutter/lib/src/painting/box_shadow.dart @@ -94,17 +94,7 @@ class BoxShadow { /// a box shadow that matches the other box shadow in color but has a zero /// offset and a zero blurRadius. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static BoxShadow lerp(BoxShadow a, BoxShadow b, double t) { assert(t != null); if (a == null && b == null) @@ -125,17 +115,7 @@ class BoxShadow { /// /// If the lists differ in length, excess items are lerped with null. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static List lerpList(List a, List b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/painting/colors.dart b/packages/flutter/lib/src/painting/colors.dart index d0ccd83e96..d735428092 100644 --- a/packages/flutter/lib/src/painting/colors.dart +++ b/packages/flutter/lib/src/painting/colors.dart @@ -194,19 +194,9 @@ class HSVColor { /// that will interpolate from a transparent red and cycle through the hues to /// match the target color, regardless of what that color's hue is. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). + /// {@macro flutter.material.themeData.lerp} /// /// Values outside of the valid range for each channel will be clamped. - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. static HSVColor lerp(HSVColor a, HSVColor b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/painting/decoration.dart b/packages/flutter/lib/src/painting/decoration.dart index 0c12dddada..9c90f67a24 100644 --- a/packages/flutter/lib/src/painting/decoration.dart +++ b/packages/flutter/lib/src/painting/decoration.dart @@ -124,17 +124,7 @@ abstract class Decoration extends Diagnosticable { /// respectively to find a solution. If the two values can't directly be /// interpolated, then the interpolation is done via null (at `t == 0.5`). /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static Decoration lerp(Decoration a, Decoration b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/painting/edge_insets.dart b/packages/flutter/lib/src/painting/edge_insets.dart index 66c1458141..afa7672180 100644 --- a/packages/flutter/lib/src/painting/edge_insets.dart +++ b/packages/flutter/lib/src/painting/edge_insets.dart @@ -190,17 +190,7 @@ abstract class EdgeInsetsGeometry { /// representing a combination of both is returned. That object can be turned /// into a concrete [EdgeInsets] using [resolve]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static EdgeInsetsGeometry lerp(EdgeInsetsGeometry a, EdgeInsetsGeometry b, double t) { assert(t != null); if (a == null && b == null) @@ -556,17 +546,7 @@ class EdgeInsets extends EdgeInsetsGeometry { /// /// If either is null, this function interpolates from [EdgeInsets.zero]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static EdgeInsets lerp(EdgeInsets a, EdgeInsets b, double t) { assert(t != null); if (a == null && b == null) @@ -790,17 +770,7 @@ class EdgeInsetsDirectional extends EdgeInsetsGeometry { /// (either [EdgeInsets] or [EdgeInsetsDirectional]), consider the /// [EdgeInsetsGeometry.lerp] static method. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static EdgeInsetsDirectional lerp(EdgeInsetsDirectional a, EdgeInsetsDirectional b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/painting/flutter_logo.dart b/packages/flutter/lib/src/painting/flutter_logo.dart index 3732102195..e9505b6101 100644 --- a/packages/flutter/lib/src/painting/flutter_logo.dart +++ b/packages/flutter/lib/src/painting/flutter_logo.dart @@ -127,17 +127,7 @@ class FlutterLogoDecoration extends Decoration { /// non-null value. If one of the values is null, then the result is obtained /// by scaling the other value's opacity and [margin]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} /// /// See also: /// diff --git a/packages/flutter/lib/src/painting/fractional_offset.dart b/packages/flutter/lib/src/painting/fractional_offset.dart index dfa3b26378..a751e74f12 100644 --- a/packages/flutter/lib/src/painting/fractional_offset.dart +++ b/packages/flutter/lib/src/painting/fractional_offset.dart @@ -178,17 +178,7 @@ class FractionalOffset extends Alignment { /// /// If either is null, this function interpolates from [FractionalOffset.center]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static FractionalOffset lerp(FractionalOffset a, FractionalOffset b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/painting/gradient.dart b/packages/flutter/lib/src/painting/gradient.dart index df4ed65cf4..1b4217a02f 100644 --- a/packages/flutter/lib/src/painting/gradient.dart +++ b/packages/flutter/lib/src/painting/gradient.dart @@ -185,17 +185,7 @@ abstract class Gradient { /// function instead. If both return null, it returns `a` before `t == 0.5` /// and `b` after `t == 0.5`. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static Gradient lerp(Gradient a, Gradient b, double t) { assert(t != null); Gradient result; diff --git a/packages/flutter/lib/src/painting/shape_decoration.dart b/packages/flutter/lib/src/painting/shape_decoration.dart index 8ded26719c..ab7b352c15 100644 --- a/packages/flutter/lib/src/painting/shape_decoration.dart +++ b/packages/flutter/lib/src/painting/shape_decoration.dart @@ -204,17 +204,7 @@ class ShapeDecoration extends Decoration { /// fields are all null (including the [shape], which cannot normally be /// null). /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} /// /// See also: /// diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart index 32f4d334f9..88da5cc6c9 100644 --- a/packages/flutter/lib/src/painting/text_style.dart +++ b/packages/flutter/lib/src/painting/text_style.dart @@ -560,17 +560,7 @@ class TextStyle extends Diagnosticable { /// /// This will not work well if the styles don't set the same fields. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} /// /// If [foreground] is specified on either of `a` or `b`, both will be treated /// as if they have a [foreground] paint (creating a new [Paint] if necessary diff --git a/packages/flutter/lib/src/rendering/box.dart b/packages/flutter/lib/src/rendering/box.dart index 9f52c73199..a3dac1a311 100644 --- a/packages/flutter/lib/src/rendering/box.dart +++ b/packages/flutter/lib/src/rendering/box.dart @@ -449,17 +449,7 @@ class BoxConstraints extends Constraints { /// If either is null, this function interpolates from a [BoxConstraints] /// object whose fields are all set to 0.0. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static BoxConstraints lerp(BoxConstraints a, BoxConstraints b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/rendering/stack.dart b/packages/flutter/lib/src/rendering/stack.dart index 23f73e7ce2..9b1d7e11ad 100644 --- a/packages/flutter/lib/src/rendering/stack.dart +++ b/packages/flutter/lib/src/rendering/stack.dart @@ -131,17 +131,7 @@ class RelativeRect { /// /// If either rect is null, this function interpolates from [RelativeRect.fill]. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static RelativeRect lerp(RelativeRect a, RelativeRect b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/rendering/table_border.dart b/packages/flutter/lib/src/rendering/table_border.dart index a6f42e412e..f30ea6552e 100644 --- a/packages/flutter/lib/src/rendering/table_border.dart +++ b/packages/flutter/lib/src/rendering/table_border.dart @@ -147,17 +147,7 @@ class TableBorder { /// If a border is null, it is treated as having only [BorderSide.none] /// borders. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static TableBorder lerp(TableBorder a, TableBorder b, double t) { assert(t != null); if (a == null && b == null) diff --git a/packages/flutter/lib/src/widgets/icon_theme_data.dart b/packages/flutter/lib/src/widgets/icon_theme_data.dart index 75d02f7851..57585d3530 100644 --- a/packages/flutter/lib/src/widgets/icon_theme_data.dart +++ b/packages/flutter/lib/src/widgets/icon_theme_data.dart @@ -68,17 +68,7 @@ class IconThemeData extends Diagnosticable { /// Linearly interpolate between two icon theme data objects. /// - /// The `t` argument represents position on the timeline, with 0.0 meaning - /// that the interpolation has not started, returning `a` (or something - /// equivalent to `a`), 1.0 meaning that the interpolation has finished, - /// returning `b` (or something equivalent to `b`), and values in between - /// meaning that the interpolation is at the relevant point on the timeline - /// between `a` and `b`. The interpolation can be extrapolated beyond 0.0 and - /// 1.0, so negative values and values greater than 1.0 are valid (and can - /// easily be generated by curves such as [Curves.elasticInOut]). - /// - /// Values for `t` are usually obtained from an [Animation], such as - /// an [AnimationController]. + /// {@macro flutter.material.themeData.lerp} static IconThemeData lerp(IconThemeData a, IconThemeData b, double t) { assert(t != null); return IconThemeData(