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 { ...@@ -865,14 +865,11 @@ class MaterialScrollBehavior extends ScrollBehavior {
child: child, child: child,
); );
case AndroidOverscrollIndicator.glow: case AndroidOverscrollIndicator.glow:
return _buildGlowingOverscrollIndicator(context, details, child); break;
} }
case TargetPlatform.fuchsia: case TargetPlatform.fuchsia:
return _buildGlowingOverscrollIndicator(context, details, child); break;
} }
}
GlowingOverscrollIndicator _buildGlowingOverscrollIndicator(BuildContext context, ScrollableDetails details, Widget child) {
return GlowingOverscrollIndicator( return GlowingOverscrollIndicator(
axisDirection: details.direction, axisDirection: details.direction,
color: Theme.of(context).colorScheme.secondary, color: Theme.of(context).colorScheme.secondary,
......
...@@ -194,14 +194,11 @@ class ScrollBehavior { ...@@ -194,14 +194,11 @@ class ScrollBehavior {
child: child, child: child,
); );
case AndroidOverscrollIndicator.glow: case AndroidOverscrollIndicator.glow:
return _buildGlowingOverscrollIndicator(details, child); break;
} }
case TargetPlatform.fuchsia: case TargetPlatform.fuchsia:
return _buildGlowingOverscrollIndicator(details, child); break;
} }
}
GlowingOverscrollIndicator _buildGlowingOverscrollIndicator(ScrollableDetails details, Widget child) {
return GlowingOverscrollIndicator( return GlowingOverscrollIndicator(
axisDirection: details.direction, axisDirection: details.direction,
color: _kDefaultGlowColor, color: _kDefaultGlowColor,
...@@ -382,11 +379,6 @@ class _WrappedScrollBehavior implements ScrollBehavior { ...@@ -382,11 +379,6 @@ class _WrappedScrollBehavior implements ScrollBehavior {
@override @override
String toString() => objectRuntimeType(this, '_WrappedScrollBehavior'); 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. /// 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