@@ -302,8 +302,10 @@ class _FadingEdgeScrollViewState extends State<FadingEdgeScrollView>
302302 1 ,
303303 ],
304304 colors: _getColors (
305- widget.gradientFractionOnStart > 0 && ! (_isScrolledToStart ?? true ),
306- widget.gradientFractionOnEnd > 0 && ! (_isScrolledToEnd ?? false )),
305+ context,
306+ widget.gradientFractionOnStart > 0 && ! (_isScrolledToStart ?? true ),
307+ widget.gradientFractionOnEnd > 0 && ! (_isScrolledToEnd ?? false ),
308+ ),
307309 ).createShader (
308310 bounds.shift (Offset (- bounds.left, - bounds.top)),
309311 textDirection: Directionality .of (context),
@@ -335,12 +337,16 @@ class _FadingEdgeScrollViewState extends State<FadingEdgeScrollView>
335337 ? AlignmentDirectional .centerStart
336338 : AlignmentDirectional .centerEnd;
337339
338- List <Color > _getColors (bool isStartEnabled, bool isEndEnabled) => [
339- (isStartEnabled ? Colors .transparent : Colors .white),
340- Colors .white,
341- Colors .white,
342- (isEndEnabled ? Colors .transparent : Colors .white)
343- ];
340+ List <Color > _getColors (
341+ BuildContext context, bool isStartEnabled, bool isEndEnabled) {
342+ final fadeColor = Theme .of (context).scaffoldBackgroundColor;
343+ return [
344+ if (isStartEnabled) Colors .transparent else fadeColor,
345+ fadeColor,
346+ fadeColor,
347+ if (isEndEnabled) Colors .transparent else fadeColor,
348+ ];
349+ }
344350}
345351
346352extension _Let <T > on T {
0 commit comments