buildOverscrollIndicator method Null safety

Widget buildOverscrollIndicator(
  1. BuildContext context,
  2. Widget child,
  3. ScrollableDetails details
)

Applies a GlowingOverscrollIndicator to the child widget on TargetPlatform.android and TargetPlatform.fuchsia.

Implementation

Widget buildOverscrollIndicator(BuildContext context, Widget child, ScrollableDetails details) {
  // When modifying this function, consider modifying the implementation in
  // the Material and Cupertino subclasses as well.
  switch (getPlatform(context)) {
    case TargetPlatform.iOS:
    case TargetPlatform.linux:
    case TargetPlatform.macOS:
    case TargetPlatform.windows:
      return child;
    case TargetPlatform.android:
      switch (androidOverscrollIndicator) {
        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: _kDefaultGlowColor,
        child: child,
      );
  }
}