Repository: flutter
Issue: GlowingOverscrollIndicator showLeading / showTrailing false does not work
Labels: platform-android,framework,f: scrolling,has reproducible steps,P2,found in release: 3.7,found in release: 3.8,team-android,triaged-android

Trying to use **GlowingOverscrollIndicator** widget to disable overscrolls on child widgets that scroll. Minimal example code, attempts to DISABLE both top and bottom overscrolls, but they persist. Expected behaviour is that neither top or bottom of list overscroll 'color flushes' appear when the user overscrolls ... but they still do, despite **showLeading** / **showTrailing** properties set to false.

**Tests Incomplete**

- Also noticed the tests for this widget do NOT test these properties of showLeading / showTrailing at all. See test here:

https://github.com/flutter/flutter/blob/master/packages/flutter/test/widgets/overscroll_indicator_test.dart

**Documentation Errors**

Documentation says the following, but **notificationPredicate** is NOT required:

The showLeading, showTrailing, axisDirection, color, and **notificationPredicate** arguments must not be null.

http://man.hubwiz.com/docset/flutter.docset/Contents/Resources/Documents/doc/flutter/widgets/GlowingOverscrollIndicator/GlowingOverscrollIndicator.html

Documentation here also refers to an **axis** property that seems not to exist, as its web page goes nowhere:
http://man.hubwiz.com/docset/flutter.docset/Contents/Resources/Documents/doc/flutter/widgets/GlowingOverscrollIndicator-class.html

Minimal code example:

```dart
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        // Here we take the va, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        child: GlowingOverscrollIndicator(
          axisDirection: AxisDirection.up,
          // In a MaterialApp, the edge glow color is the ThemeData.accentColor but color property required
          color: Colors.red,
          notificationPredicate: (ScrollNotification notification) => notification.depth == 1,
          showLeading: false,
          showTrailing: false,
          child: ListView.builder(
          itemCount: 20,
            itemBuilder: (context, index) {
              return ListTile(
                title: Text('List Item $index'),
              );
            },
          ),
        ),
      ),
    );
  }
}
```

Flutter Doctor output:

```bash
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Mac OS X 10.14.6 18G2022, locale en-AU)
    • Flutter version 1.12.13+hotfix.5 at /Users/gamma/Documents/flutter
    • Framework revision 27321ebbad (5 weeks ago), 2019-12-10 18:15:01 -0800
    • Engine revision 2994f7e1e6
    • Dart version 2.7.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /Users/gamma/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = /Users/gamma/Library/Android/sdk
    • Java binary at: /Applications/Android Studio 3.5 Preview.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.3.1, Build version 11C504
    • CocoaPods version 1.8.4

[✓] Android Studio (version 3.5)
    • Android Studio at /Applications/Android Studio 3.5 Preview.app/Contents
    • Flutter plugin version 42.1.1
    • Dart plugin version 191.8593
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)

[✓] VS Code (version 1.41.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.7.1

[✓] Connected device (1 available)
    • Pixel 3 XL • 8A4Y0F6ED • android-arm64 • Android 10 (API 29)

• No issues found!
```