Skip to content

Commit fccca49

Browse files
authored
Refactor buildOverscrollIndicator (flutter#123246)
1 parent 7f41ab2 commit fccca49

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

packages/flutter/lib/src/material/app.dart

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -865,14 +865,11 @@ class MaterialScrollBehavior extends ScrollBehavior {
865865
child: child,
866866
);
867867
case AndroidOverscrollIndicator.glow:
868-
return _buildGlowingOverscrollIndicator(context, details, child);
868+
break;
869869
}
870870
case TargetPlatform.fuchsia:
871-
return _buildGlowingOverscrollIndicator(context, details, child);
871+
break;
872872
}
873-
}
874-
875-
GlowingOverscrollIndicator _buildGlowingOverscrollIndicator(BuildContext context, ScrollableDetails details, Widget child) {
876873
return GlowingOverscrollIndicator(
877874
axisDirection: details.direction,
878875
color: Theme.of(context).colorScheme.secondary,

packages/flutter/lib/src/widgets/scroll_configuration.dart

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,11 @@ class ScrollBehavior {
194194
child: child,
195195
);
196196
case AndroidOverscrollIndicator.glow:
197-
return _buildGlowingOverscrollIndicator(details, child);
197+
break;
198198
}
199199
case TargetPlatform.fuchsia:
200-
return _buildGlowingOverscrollIndicator(details, child);
200+
break;
201201
}
202-
}
203-
204-
GlowingOverscrollIndicator _buildGlowingOverscrollIndicator(ScrollableDetails details, Widget child) {
205202
return GlowingOverscrollIndicator(
206203
axisDirection: details.direction,
207204
color: _kDefaultGlowColor,
@@ -382,11 +379,6 @@ class _WrappedScrollBehavior implements ScrollBehavior {
382379

383380
@override
384381
String toString() => objectRuntimeType(this, '_WrappedScrollBehavior');
385-
386-
@override
387-
GlowingOverscrollIndicator _buildGlowingOverscrollIndicator(ScrollableDetails details, Widget child) {
388-
return delegate._buildGlowingOverscrollIndicator(details, child);
389-
}
390382
}
391383

392384
/// Controls how [Scrollable] widgets behave in a subtree.

0 commit comments

Comments
 (0)