Add support for text shadows and roll engine (26 commits) (#22449)

* Add support for shadows in text.

* Use dart:ui Shadow as base class for Shadows

* Update lerp definition

* Roll engine 3ffa3629523..84fe4a9f7e24e4 - Text Shadows and update goldens for skia roll.

git log 50c2e69daff4e207c54e463d2304139985c7511c..32f417db0d566d354605305cb29c251276fa65ee --oneline --no-merges
32f417db0 Roll tonic to 077be256142ede39a271385907faadf4fcc62a4d. (#6541)
4ee77256c Revert "Roll Dart to 1f4dfce179c8f05c9e48759300a15e671b88cc10 (#6515)" (#6537)
964acafeb Roll src/third_party/skia 646d917d3c71..c6a17104ad68 (1 commits) (#6536)
d4bae4ca4 Roll src/third_party/skia 2b2c00f6ec36..646d917d3c71 (1 commits) (#6535)
ff93ccf47 Roll src/third_party/skia 681692726fc0..2b2c00f6ec36 (1 commits) (#6534)
a4161c895 Roll src/third_party/skia 23775a2e9736..681692726fc0 (1 commits) (#6532)
116072e46 Roll src/third_party/skia 7435f2553f53..23775a2e9736 (1 commits) (#6531)
ef0b0f6e9 Roll src/third_party/skia bc7a51e79c5b..7435f2553f53 (1 commits) (#6530)
f46b7b971 Roll src/third_party/skia b28db529c866..bc7a51e79c5b (1 commits) (#6529)
9033c3902 Roll src/third_party/skia 7e67041a1428..b28db529c866 (1 commits) (#6528)
e6887a412 Add missing imports for unicode/utf16.h (#6524)
1242f6dfe Roll src/third_party/skia d38382d060ca..7e67041a1428 (2 commits) (#6527)
a1bbea77c Add a no-op platform view layer. (#6505)
2bb3afad8 Roll src/third_party/skia 21bd60daa3f3..d38382d060ca (10 commits) (#6526)
75e875240 Fix the Mac embedder build (#6525)
436f9707b Add version check for dismissable (#6522)
7767c785b Provide a default GL function resolver in the embedder (#6523)
32841dd89 Case-insensitive matching of family names for custom fonts (#6519)
a9076c7e6 Roll src/third_party/skia 419709dbb167..21bd60daa3f3 (11 commits) (#6520)
f2e7441b5 An API for loading fonts from a buffer provided by the application (#6508)
05aac0f27 fix ResourceExtractor npe. (#6461)
cf5a2a145 Roll src/third_party/skia b27a9cf2f4a8..419709dbb167 (16 commits) (#6517)
84fe4a9f7 Re-revert invalid line height tests (#6516)
5f529566c Add support for text shadows (#6385)
e44c10c96 Reland "Share engine layers with the framework" (#6412) (#6468)
ba0449971 Roll Dart to 1f4dfce179c8f05c9e48759300a15e671b88cc10 (#6515)

diff --git a/bin/internal/engine.version b/bin/internal/engine.version
index b0bb6c1..34c132c 100644
--- a/bin/internal/engine.version
+++ b/bin/internal/engine.version
@@ -1 +1 @@
-50c2e69daff4e207c54e463d2304139985c7511c
+32f417db0d566d354605305cb29c251276fa65ee
diff --git a/bin/internal/goldens.version b/bin/internal/goldens.version
index bed3406..d016c8d 100644
--- a/bin/internal/goldens.version
+++ b/bin/internal/goldens.version
@@ -1 +1 @@
-fcb6a6cad08bd4a7d5c0157b9f83acadfa9be7e3
+bf46dc6b05154649926392e0fc042289e6172ca7
diff --git a/packages/flutter/lib/painting.dart b/packages/flutter/lib/painting.dart
index 7ca486a..55894da 100644
--- a/packages/flutter/lib/painting.dart
+++ b/packages/flutter/lib/painting.dart
@@ -17,6 +17,8 @@
 ///    painting boxes.
 library painting;
 
+export 'dart:ui' show Shadow;
+
 export 'src/painting/alignment.dart';
 export 'src/painting/basic_types.dart';
 export 'src/painting/beveled_rectangle_border.dart';
diff --git a/packages/flutter/lib/src/material/chip_theme.dart b/packages/flutter/lib/src/material/chip_theme.dart
index 71d9ab7..f530dc6 100644
--- a/packages/flutter/lib/src/material/chip_theme.dart
+++ b/packages/flutter/lib/src/material/chip_theme.dart
@@ -360,7 +360,7 @@
   ///
   /// The arguments must not be null.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 44d8c1d..73bcfe6 100644
--- a/packages/flutter/lib/src/material/slider_theme.dart
+++ b/packages/flutter/lib/src/material/slider_theme.dart
@@ -391,7 +391,7 @@
   ///
   /// The arguments must not be null.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 f9be2c7..08414bf 100644
--- a/packages/flutter/lib/src/material/tab_bar_theme.dart
+++ b/packages/flutter/lib/src/material/tab_bar_theme.dart
@@ -63,7 +63,7 @@
   ///
   /// The arguments must not be null.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static TabBarTheme lerp(TabBarTheme a, TabBarTheme b, double t) {
     assert(a != null);
     assert(b != null);
diff --git a/packages/flutter/lib/src/material/theme_data.dart b/packages/flutter/lib/src/material/theme_data.dart
index e6639e2..ef01166 100644
--- a/packages/flutter/lib/src/material/theme_data.dart
+++ b/packages/flutter/lib/src/material/theme_data.dart
@@ -787,7 +787,7 @@
   ///
   /// The arguments must not be null.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static ThemeData lerp(ThemeData a, ThemeData b, double t) {
     assert(a != null);
     assert(b != null);
diff --git a/packages/flutter/lib/src/material/typography.dart b/packages/flutter/lib/src/material/typography.dart
index baa49d9..bf867b6 100644
--- a/packages/flutter/lib/src/material/typography.dart
+++ b/packages/flutter/lib/src/material/typography.dart
@@ -212,7 +212,7 @@
 
   /// Linearly interpolate between two [Typography] objects.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static Typography lerp(Typography a, Typography b, double t) {
     return Typography(
       black: TextTheme.lerp(a.black, b.black, t),
diff --git a/packages/flutter/lib/src/painting/alignment.dart b/packages/flutter/lib/src/painting/alignment.dart
index 007348e..21ffcd6 100644
--- a/packages/flutter/lib/src/painting/alignment.dart
+++ b/packages/flutter/lib/src/painting/alignment.dart
@@ -85,7 +85,7 @@
   /// representing a combination of both is returned. That object can be turned
   /// into a concrete [Alignment] using [resolve].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static AlignmentGeometry lerp(AlignmentGeometry a, AlignmentGeometry b, double t) {
     assert(t != null);
     if (a == null && b == null)
@@ -324,7 +324,7 @@
   ///
   /// If either is null, this function interpolates from [Alignment.center].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static Alignment lerp(Alignment a, Alignment b, double t) {
     assert(t != null);
     if (a == null && b == null)
@@ -505,7 +505,7 @@
   ///
   /// If either is null, this function interpolates from [AlignmentDirectional.center].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 8ee074f..a64fd7d 100644
--- a/packages/flutter/lib/src/painting/border_radius.dart
+++ b/packages/flutter/lib/src/painting/border_radius.dart
@@ -127,7 +127,7 @@
   /// representing a combination of both is returned. That object can be turned
   /// into a concrete [BorderRadius] using [resolve].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static BorderRadiusGeometry lerp(BorderRadiusGeometry a, BorderRadiusGeometry b, double t) {
     assert(t != null);
     if (a == null && b == null)
@@ -471,7 +471,7 @@
   ///
   /// If either is null, this function interpolates from [BorderRadius.zero].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static BorderRadius lerp(BorderRadius a, BorderRadius b, double t) {
     assert(t != null);
     if (a == null && b == null)
@@ -688,7 +688,7 @@
   ///
   /// If either is null, this function interpolates from [BorderRadiusDirectional.zero].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 9e9f309..c3eff32 100644
--- a/packages/flutter/lib/src/painting/borders.dart
+++ b/packages/flutter/lib/src/painting/borders.dart
@@ -198,7 +198,7 @@
   ///
   /// The arguments must not be null.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static BorderSide lerp(BorderSide a, BorderSide b, double t) {
     assert(a != null);
     assert(b != null);
@@ -404,7 +404,7 @@
   /// function instead. If both return null, it returns `a` before `t=0.5`
   /// and `b` after `t=0.5`.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 aeaeb57..fea4765 100644
--- a/packages/flutter/lib/src/painting/box_border.dart
+++ b/packages/flutter/lib/src/painting/box_border.dart
@@ -98,7 +98,7 @@
   /// For a more flexible approach, consider [ShapeBorder.lerp], which would
   /// instead [add] the two sets of sides and interpolate them simultaneously.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static BoxBorder lerp(BoxBorder a, BoxBorder b, double t) {
     assert(t != null);
     if ((a is Border || a == null) && (b is Border || b == null))
@@ -421,7 +421,7 @@
   /// If a border is null, it is treated as having four [BorderSide.none]
   /// borders.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static Border lerp(Border a, Border b, double t) {
     assert(t != null);
     if (a == null && b == null)
@@ -711,7 +711,7 @@
   /// If a border is null, it is treated as having four [BorderSide.none]
   /// borders.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 90a7e37..daf80b2 100644
--- a/packages/flutter/lib/src/painting/box_decoration.dart
+++ b/packages/flutter/lib/src/painting/box_decoration.dart
@@ -215,7 +215,7 @@
   /// unmodified. Otherwise, the values are computed by interpolating the
   /// properties appropriately.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   ///
   /// See also:
   ///
diff --git a/packages/flutter/lib/src/painting/box_shadow.dart b/packages/flutter/lib/src/painting/box_shadow.dart
index e707b7e..f0cb446 100644
--- a/packages/flutter/lib/src/painting/box_shadow.dart
+++ b/packages/flutter/lib/src/painting/box_shadow.dart
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 import 'dart:math' as math;
-import 'dart:ui' as ui show lerpDouble;
+import 'dart:ui' as ui show Shadow, lerpDouble;
 
 import 'package:flutter/foundation.dart';
 
@@ -12,6 +12,8 @@
 
 /// A shadow cast by a box.
 ///
+/// Inherits from [Shadow]
+///
 /// [BoxShadow] can cast non-rectangular shadows if the box is non-rectangular
 /// (e.g., has a border radius or a circular shape).
 ///
@@ -20,52 +22,30 @@
 /// See also:
 ///
 ///  * [Canvas.drawShadow], which is a more efficient way to draw shadows.
+///  * [Shadow], which is the parent class that lacks [spreadRadius].
 @immutable
-class BoxShadow {
+class BoxShadow extends ui.Shadow {
   /// Creates a box shadow.
   ///
   /// By default, the shadow is solid black with zero [offset], [blurRadius],
   /// and [spreadRadius].
   const BoxShadow({
-    this.color = const Color(0xFF000000),
-    this.offset = Offset.zero,
-    this.blurRadius = 0.0,
+    Color color = const Color(0xFF000000),
+    Offset offset = Offset.zero,
+    double blurRadius = 0.0,
     this.spreadRadius = 0.0
-  });
-
-  /// The color of the shadow.
-  final Color color;
-
-  /// The displacement of the shadow from the box.
-  final Offset offset;
-
-  /// The standard deviation of the Gaussian to convolve with the box's shape.
-  final double blurRadius;
+  }) : super(color: color, offset: offset, blurRadius: blurRadius);
 
   /// The amount the box should be inflated prior to applying the blur.
   final double spreadRadius;
 
-  /// Converts a blur radius in pixels to sigmas.
-  ///
-  /// See the sigma argument to [MaskFilter.blur].
-  //
-  // See SkBlurMask::ConvertRadiusToSigma().
-  // <https://github.com/google/skia/blob/bb5b77db51d2e149ee66db284903572a5aac09be/src/effects/SkBlurMask.cpp#L23>
-  static double convertRadiusToSigma(double radius) {
-    return radius * 0.57735 + 0.5;
-  }
-
-  /// The [blurRadius] in sigmas instead of logical pixels.
-  ///
-  /// See the sigma argument to [MaskFilter.blur].
-  double get blurSigma => convertRadiusToSigma(blurRadius);
-
   /// Create the [Paint] object that corresponds to this shadow description.
   ///
   /// The [offset] and [spreadRadius] are not represented in the [Paint] object.
   /// To honor those as well, the shape should be inflated by [spreadRadius] pixels
   /// in every direction and then translated by [offset] before being filled using
   /// this [Paint].
+  @override
   Paint toPaint() {
     final Paint result = Paint()
       ..color = color
@@ -79,6 +59,7 @@
   }
 
   /// Returns a new box shadow with its offset, blurRadius, and spreadRadius scaled by the given factor.
+  @override
   BoxShadow scale(double factor) {
     return BoxShadow(
       color: color,
@@ -94,7 +75,7 @@
   /// a box shadow that matches the other box shadow in color but has a zero
   /// offset and a zero blurRadius.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static BoxShadow lerp(BoxShadow a, BoxShadow b, double t) {
     assert(t != null);
     if (a == null && b == null)
@@ -115,7 +96,7 @@
   ///
   /// If the lists differ in length, excess items are lerped with null.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static List<BoxShadow> lerpList(List<BoxShadow> a, List<BoxShadow> 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 39928f6..a090400 100644
--- a/packages/flutter/lib/src/painting/colors.dart
+++ b/packages/flutter/lib/src/painting/colors.dart
@@ -194,7 +194,7 @@
   /// 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.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   ///
   /// Values outside of the valid range for each channel will be clamped.
   static HSVColor lerp(HSVColor a, HSVColor b, double t) {
diff --git a/packages/flutter/lib/src/painting/decoration.dart b/packages/flutter/lib/src/painting/decoration.dart
index 4141870..4c5cc2d 100644
--- a/packages/flutter/lib/src/painting/decoration.dart
+++ b/packages/flutter/lib/src/painting/decoration.dart
@@ -124,7 +124,7 @@
   /// 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`).
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 f0347b1..8963619 100644
--- a/packages/flutter/lib/src/painting/edge_insets.dart
+++ b/packages/flutter/lib/src/painting/edge_insets.dart
@@ -190,7 +190,7 @@
   /// representing a combination of both is returned. That object can be turned
   /// into a concrete [EdgeInsets] using [resolve].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static EdgeInsetsGeometry lerp(EdgeInsetsGeometry a, EdgeInsetsGeometry b, double t) {
     assert(t != null);
     if (a == null && b == null)
@@ -546,7 +546,7 @@
   ///
   /// If either is null, this function interpolates from [EdgeInsets.zero].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static EdgeInsets lerp(EdgeInsets a, EdgeInsets b, double t) {
     assert(t != null);
     if (a == null && b == null)
@@ -770,7 +770,7 @@
   /// (either [EdgeInsets] or [EdgeInsetsDirectional]), consider the
   /// [EdgeInsetsGeometry.lerp] static method.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 8ec0627..44a67b6 100644
--- a/packages/flutter/lib/src/painting/flutter_logo.dart
+++ b/packages/flutter/lib/src/painting/flutter_logo.dart
@@ -127,7 +127,7 @@
   /// non-null value. If one of the values is null, then the result is obtained
   /// by scaling the other value's opacity and [margin].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   ///
   /// See also:
   ///
diff --git a/packages/flutter/lib/src/painting/fractional_offset.dart b/packages/flutter/lib/src/painting/fractional_offset.dart
index c957085..247b5d2 100644
--- a/packages/flutter/lib/src/painting/fractional_offset.dart
+++ b/packages/flutter/lib/src/painting/fractional_offset.dart
@@ -178,7 +178,7 @@
   ///
   /// If either is null, this function interpolates from [FractionalOffset.center].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 18b2185..d765f54 100644
--- a/packages/flutter/lib/src/painting/gradient.dart
+++ b/packages/flutter/lib/src/painting/gradient.dart
@@ -185,19 +185,7 @@
   /// function instead. If both return null, it returns `a` before `t == 0.5`
   /// and `b` after `t == 0.5`.
   ///
-  /// {@template flutter.painting.gradient.lerp}
-  /// 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<double>], such as
-  /// an [AnimationController].
-  /// {@endtemplate}
+  /// {@macro dart.ui.shadow.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 880dac8..76a2a70 100644
--- a/packages/flutter/lib/src/painting/shape_decoration.dart
+++ b/packages/flutter/lib/src/painting/shape_decoration.dart
@@ -204,7 +204,7 @@
   /// fields are all null (including the [shape], which cannot normally be
   /// null).
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   ///
   /// See also:
   ///
diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart
index a8748e1..6b27a01 100644
--- a/packages/flutter/lib/src/painting/text_style.dart
+++ b/packages/flutter/lib/src/painting/text_style.dart
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-import 'dart:ui' as ui show ParagraphStyle, TextStyle, lerpDouble;
+import 'dart:ui' as ui show ParagraphStyle, TextStyle, lerpDouble, Shadow;
 
 import 'package:flutter/foundation.dart';
 
@@ -238,6 +238,7 @@
     this.locale,
     this.foreground,
     this.background,
+    this.shadows,
     this.decoration,
     this.decorationColor,
     this.decorationStyle,
@@ -368,6 +369,15 @@
   /// [compareTo], and it does not affect [hashCode].
   final String debugLabel;
 
+  /// A list of [Shadow]s that will be painted underneath the text.
+  ///
+  /// Multiple shadows are supported to replicate lighting from multiple light
+  /// sources.
+  ///
+  /// Shadows must be in the same order for [TextStyle] to be considered as
+  /// equivalent as order produces differing transparency.
+  final List<ui.Shadow> shadows;
+
   /// Creates a copy of this text style but with the given fields replaced with
   /// the new values.
   ///
@@ -386,6 +396,7 @@
     Locale locale,
     Paint foreground,
     Paint background,
+    List<ui.Shadow> shadows,
     TextDecoration decoration,
     Color decorationColor,
     TextDecorationStyle decorationStyle,
@@ -412,6 +423,7 @@
       locale: locale ?? this.locale,
       foreground: foreground ?? this.foreground,
       background: background ?? this.background,
+      shadows: shadows ?? this.shadows,
       decoration: decoration ?? this.decoration,
       decorationColor: decorationColor ?? this.decorationColor,
       decorationStyle: decorationStyle ?? this.decorationStyle,
@@ -497,6 +509,7 @@
       locale: locale,
       foreground: foreground != null ? foreground : null,
       background: background,
+      shadows: shadows,
       decoration: decoration ?? this.decoration,
       decorationColor: decorationColor ?? this.decorationColor,
       decorationStyle: decorationStyle ?? this.decorationStyle,
@@ -547,6 +560,7 @@
       locale: other.locale,
       foreground: other.foreground,
       background: other.background,
+      shadows: other.shadows,
       decoration: other.decoration,
       decorationColor: other.decorationColor,
       decorationStyle: other.decorationStyle,
@@ -558,7 +572,7 @@
   ///
   /// This will not work well if the styles don't set the same fields.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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
@@ -592,6 +606,7 @@
         foreground: t < 0.5 ? null : b.foreground,
         background: t < 0.5 ? null : b.background,
         decoration: t < 0.5 ? null : b.decoration,
+        shadows: t < 0.5 ? null : b.shadows,
         decorationColor: Color.lerp(null, b.decorationColor, t),
         decorationStyle: t < 0.5 ? null : b.decorationStyle,
         debugLabel: lerpDebugLabel,
@@ -613,6 +628,7 @@
         locale: t < 0.5 ? a.locale : null,
         foreground: t < 0.5 ? a.foreground : null,
         background: t < 0.5 ? a.background : null,
+        shadows: t < 0.5 ? a.shadows : null,
         decoration: t < 0.5 ? a.decoration : null,
         decorationColor: Color.lerp(a.decorationColor, null, t),
         decorationStyle: t < 0.5 ? a.decorationStyle : null,
@@ -638,6 +654,7 @@
           : b.foreground ?? (Paint()..color = b.color)
         : null,
       background: t < 0.5 ? a.background : b.background,
+      shadows: t < 0.5 ? a.shadows : b.shadows,
       decoration: t < 0.5 ? a.decoration : b.decoration,
       decorationColor: Color.lerp(a.decorationColor, b.decorationColor, t),
       decorationStyle: t < 0.5 ? a.decorationStyle : b.decorationStyle,
@@ -663,6 +680,7 @@
       locale: locale,
       foreground: foreground,
       background: background,
+      shadows: shadows,
     );
   }
 
@@ -718,7 +736,8 @@
         height != other.height ||
         locale != other.locale ||
         foreground != other.foreground ||
-        background != other.background)
+        background != other.background ||
+        !listEquals(shadows, other.shadows))
       return RenderComparison.layout;
     if (color != other.color ||
         decoration != other.decoration ||
@@ -750,7 +769,8 @@
            background == typedOther.background &&
            decoration == typedOther.decoration &&
            decorationColor == typedOther.decorationColor &&
-           decorationStyle == typedOther.decorationStyle;
+           decorationStyle == typedOther.decorationStyle &&
+           listEquals(shadows, typedOther.shadows);
   }
 
   @override
@@ -771,7 +791,8 @@
       background,
       decoration,
       decorationColor,
-      decorationStyle
+      decorationStyle,
+      shadows
     );
   }
 
diff --git a/packages/flutter/lib/src/rendering/box.dart b/packages/flutter/lib/src/rendering/box.dart
index ad4ecee..0614c73 100644
--- a/packages/flutter/lib/src/rendering/box.dart
+++ b/packages/flutter/lib/src/rendering/box.dart
@@ -449,7 +449,7 @@
   /// If either is null, this function interpolates from a [BoxConstraints]
   /// object whose fields are all set to 0.0.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 9712d15..c039eee 100644
--- a/packages/flutter/lib/src/rendering/stack.dart
+++ b/packages/flutter/lib/src/rendering/stack.dart
@@ -131,7 +131,7 @@
   ///
   /// If either rect is null, this function interpolates from [RelativeRect.fill].
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 5c471a7..5913025 100644
--- a/packages/flutter/lib/src/rendering/table_border.dart
+++ b/packages/flutter/lib/src/rendering/table_border.dart
@@ -147,7 +147,7 @@
   /// If a border is null, it is treated as having only [BorderSide.none]
   /// borders.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.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 7df1d4f..676b422 100644
--- a/packages/flutter/lib/src/widgets/icon_theme_data.dart
+++ b/packages/flutter/lib/src/widgets/icon_theme_data.dart
@@ -68,7 +68,7 @@
 
   /// Linearly interpolate between two icon theme data objects.
   ///
-  /// {@macro flutter.painting.gradient.lerp}
+  /// {@macro dart.ui.shadow.lerp}
   static IconThemeData lerp(IconThemeData a, IconThemeData b, double t) {
     assert(t != null);
     return IconThemeData(
diff --git a/packages/flutter/test/material/theme_test.dart b/packages/flutter/test/material/theme_test.dart
index b4a2872..be9ec5b 100644
--- a/packages/flutter/test/material/theme_test.dart
+++ b/packages/flutter/test/material/theme_test.dart
@@ -460,6 +460,7 @@
   @override double get letterSpacing => _delegate.letterSpacing;
   @override TextBaseline get textBaseline => _delegate.textBaseline;
   @override double get wordSpacing => _delegate.wordSpacing;
+  @override List<Shadow> get shadows => _delegate.shadows;
 
   @override
   String toString({DiagnosticLevel minLevel = DiagnosticLevel.debug}) =>
@@ -486,7 +487,7 @@
   }
 
   @override
-  TextStyle copyWith({Color color, String fontFamily, double fontSize, FontWeight fontWeight, FontStyle fontStyle, double letterSpacing, double wordSpacing, TextBaseline textBaseline, double height, Locale locale, ui.Paint foreground, ui.Paint background, TextDecoration decoration, Color decorationColor, TextDecorationStyle decorationStyle, String debugLabel}) {
+  TextStyle copyWith({Color color, String fontFamily, double fontSize, FontWeight fontWeight, FontStyle fontStyle, double letterSpacing, double wordSpacing, TextBaseline textBaseline, double height, Locale locale, ui.Paint foreground, ui.Paint background, List<Shadow> shadows, TextDecoration decoration, Color decorationColor, TextDecorationStyle decorationStyle, String debugLabel}) {
     throw UnimplementedError();
   }
 
diff --git a/packages/flutter/test/painting/text_style_test.dart b/packages/flutter/test/painting/text_style_test.dart
index 61e4433..b260644 100644
--- a/packages/flutter/test/painting/text_style_test.dart
+++ b/packages/flutter/test/painting/text_style_test.dart
@@ -163,10 +163,10 @@
 
     final ui.TextStyle ts5 = s5.getTextStyle();
     expect(ts5, equals(ui.TextStyle(fontWeight: FontWeight.w700, fontSize: 12.0, height: 123.0)));
-    expect(ts5.toString(), 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: FontWeight.w700, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontSize: 12.0, letterSpacing: unspecified, wordSpacing: unspecified, height: 123.0x, locale: unspecified, background: unspecified, foreground: unspecified)');
+    expect(ts5.toString(), 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: FontWeight.w700, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontSize: 12.0, letterSpacing: unspecified, wordSpacing: unspecified, height: 123.0x, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified)');
     final ui.TextStyle ts2 = s2.getTextStyle();
     expect(ts2, equals(ui.TextStyle(color: const Color(0xFF00FF00), fontWeight: FontWeight.w800, fontSize: 10.0, height: 100.0)));
-    expect(ts2.toString(), 'TextStyle(color: Color(0xff00ff00), decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: FontWeight.w800, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontSize: 10.0, letterSpacing: unspecified, wordSpacing: unspecified, height: 100.0x, locale: unspecified, background: unspecified, foreground: unspecified)');
+    expect(ts2.toString(), 'TextStyle(color: Color(0xff00ff00), decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: FontWeight.w800, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontSize: 10.0, letterSpacing: unspecified, wordSpacing: unspecified, height: 100.0x, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified)');
 
     final ui.ParagraphStyle ps2 = s2.getParagraphStyle(textAlign: TextAlign.center);
     expect(ps2, equals(ui.ParagraphStyle(textAlign: TextAlign.center, fontWeight: FontWeight.w800, fontSize: 10.0, lineHeight: 100.0)));
@@ -189,11 +189,11 @@
   test('TextStyle using package font', () {
     const TextStyle s6 = TextStyle(fontFamily: 'test');
     expect(s6.fontFamily, 'test');
-    expect(s6.getTextStyle().toString(), 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: unspecified, fontStyle: unspecified, textBaseline: unspecified, fontFamily: test, fontSize: unspecified, letterSpacing: unspecified, wordSpacing: unspecified, height: unspecified, locale: unspecified, background: unspecified, foreground: unspecified)');
+    expect(s6.getTextStyle().toString(), 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: unspecified, fontStyle: unspecified, textBaseline: unspecified, fontFamily: test, fontSize: unspecified, letterSpacing: unspecified, wordSpacing: unspecified, height: unspecified, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified)');
 
     const TextStyle s7 = TextStyle(fontFamily: 'test', package: 'p');
     expect(s7.fontFamily, 'packages/p/test');
-    expect(s7.getTextStyle().toString(), 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: unspecified, fontStyle: unspecified, textBaseline: unspecified, fontFamily: packages/p/test, fontSize: unspecified, letterSpacing: unspecified, wordSpacing: unspecified, height: unspecified, locale: unspecified, background: unspecified, foreground: unspecified)');
+    expect(s7.getTextStyle().toString(), 'TextStyle(color: unspecified, decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: unspecified, fontStyle: unspecified, textBaseline: unspecified, fontFamily: packages/p/test, fontSize: unspecified, letterSpacing: unspecified, wordSpacing: unspecified, height: unspecified, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified)');
   });
 
   test('TextStyle.debugLabel', () {
diff --git a/packages/flutter_test/test/reference_image_test.dart b/packages/flutter_test/test/reference_image_test.dart
index 5e97180..9322164 100644
--- a/packages/flutter_test/test/reference_image_test.dart
+++ b/packages/flutter_test/test/reference_image_test.dart
@@ -57,7 +57,7 @@
     testWidgets('when image pixels do not match', (WidgetTester tester) async {
       expect(
         await matchesReferenceImage(createTestImage(100, 100, red)).matchAsync(createTestImage(100, 100, transparentRed)),
-        equals('does not match on 53 pixels'),
+        equals('does not match on 57 pixels'),
       );
       expect(
         await matchesReferenceImage(createTestImage(100, 100, red)).matchAsync(createTestImage(100, 100, green)),