From d18edb0f24374c76261f1101904f0de04eb56de5 Mon Sep 17 00:00:00 2001 From: Kenzie Schmoll Date: Tue, 13 Sep 2022 17:08:05 -0700 Subject: [PATCH] Use GradientContainer to optimize raster performance --- .../widgets/_collapsing_pull_quote_image.dart | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/lib/ui/screens/editorial/widgets/_collapsing_pull_quote_image.dart b/lib/ui/screens/editorial/widgets/_collapsing_pull_quote_image.dart index 3b24528e..fe74c3f5 100644 --- a/lib/ui/screens/editorial/widgets/_collapsing_pull_quote_image.dart +++ b/lib/ui/screens/editorial/widgets/_collapsing_pull_quote_image.dart @@ -116,7 +116,7 @@ class _CollapsingPullQuoteImage extends StatelessWidget { ); } - Stack _buildImage(double collapseAmt) { + Widget _buildImage(double collapseAmt) { return Stack( fit: StackFit.expand, children: [ @@ -128,16 +128,13 @@ class _CollapsingPullQuoteImage extends StatelessWidget { opacity: AlwaysStoppedAnimation(1 - collapseAmt * .7), ), ), - BlendMask( - blendModes: const [BlendMode.colorBurn], - opacity: .9, - child: VtGradient( - [ - Color(0xFFBEABA1).withOpacity(1), - Color(0xFFA6958C).withOpacity(1), - ], - const [0, 1], - ), + GradientContainer( + [ + Color(0xFFBEABA1).withOpacity(.9), + Color(0xFFA6958C).withOpacity(.9), + ], + const [0.0, 1.0], + blendMode: BlendMode.colorBurn, ), ], );