Use GradientContainer to optimize raster performance

This commit is contained in:
Kenzie Schmoll 2022-09-13 17:08:05 -07:00
parent b1f0bed1cc
commit d18edb0f24

View File

@ -116,7 +116,7 @@ class _CollapsingPullQuoteImage extends StatelessWidget {
); );
} }
Stack _buildImage(double collapseAmt) { Widget _buildImage(double collapseAmt) {
return Stack( return Stack(
fit: StackFit.expand, fit: StackFit.expand,
children: [ children: [
@ -128,16 +128,13 @@ class _CollapsingPullQuoteImage extends StatelessWidget {
opacity: AlwaysStoppedAnimation(1 - collapseAmt * .7), opacity: AlwaysStoppedAnimation(1 - collapseAmt * .7),
), ),
), ),
BlendMask( GradientContainer(
blendModes: const [BlendMode.colorBurn],
opacity: .9,
child: VtGradient(
[ [
Color(0xFFBEABA1).withOpacity(1), Color(0xFFBEABA1).withOpacity(.9),
Color(0xFFA6958C).withOpacity(1), Color(0xFFA6958C).withOpacity(.9),
], ],
const [0, 1], const [0.0, 1.0],
), blendMode: BlendMode.colorBurn,
), ),
], ],
); );