buildOverscrollIndicator method
Widget
buildOverscrollIndicator(
- BuildContext context,
- Widget child,
- ScrollableDetails details
override
Applies a GlowingOverscrollIndicator to the child widget on TargetPlatform.android and TargetPlatform.fuchsia.
Implementation
@override
Widget buildOverscrollIndicator(
BuildContext context, Widget child, ScrollableDetails details) {
// When modifying this function, consider modifying the implementation in
// the base class as well.
final AndroidOverscrollIndicator indicator = _androidOverscrollIndicator ??
Theme.of(context).androidOverscrollIndicator ??
androidOverscrollIndicator;
switch (getPlatform(context)) {
case TargetPlatform.iOS:
case TargetPlatform.linux:
case TargetPlatform.macOS:
case TargetPlatform.windows:
return child;
case TargetPlatform.android:
switch (indicator) {
case AndroidOverscrollIndicator.stretch:
return StretchingOverscrollIndicator(
axisDirection: details.direction,
child: child,
);
case AndroidOverscrollIndicator.glow:
continue glow;
}
glow:
case TargetPlatform.fuchsia:
return GlowingOverscrollIndicator(
axisDirection: details.direction,
color: Theme.of(context).colorScheme.secondary,
child: child,
showLeading: showLeading,
showTrailing: showTrailing,
);
}
}