Unverified Commit fccca493 authored by Michael Goderbauer's avatar Michael Goderbauer Committed by GitHub

Refactor buildOverscrollIndicator (#123246)

parent 7f41ab25
......@@ -865,14 +865,11 @@ class MaterialScrollBehavior extends ScrollBehavior {
child: child,
);
case AndroidOverscrollIndicator.glow:
return _buildGlowingOverscrollIndicator(context, details, child);
break;
}
case TargetPlatform.fuchsia:
return _buildGlowingOverscrollIndicator(context, details, child);
break;
}
}
GlowingOverscrollIndicator _buildGlowingOverscrollIndicator(BuildContext context, ScrollableDetails details, Widget child) {
return GlowingOverscrollIndicator(
axisDirection: details.direction,
color: Theme.of(context).colorScheme.secondary,
......
......@@ -194,14 +194,11 @@ class ScrollBehavior {
child: child,
);
case AndroidOverscrollIndicator.glow:
return _buildGlowingOverscrollIndicator(details, child);
break;
}
case TargetPlatform.fuchsia:
return _buildGlowingOverscrollIndicator(details, child);
break;
}
}
GlowingOverscrollIndicator _buildGlowingOverscrollIndicator(ScrollableDetails details, Widget child) {
return GlowingOverscrollIndicator(
axisDirection: details.direction,
color: _kDefaultGlowColor,
......@@ -382,11 +379,6 @@ class _WrappedScrollBehavior implements ScrollBehavior {
@override
String toString() => objectRuntimeType(this, '_WrappedScrollBehavior');
@override
GlowingOverscrollIndicator _buildGlowingOverscrollIndicator(ScrollableDetails details, Widget child) {
return delegate._buildGlowingOverscrollIndicator(details, child);
}
}
/// Controls how [Scrollable] widgets behave in a subtree.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment