skip to Main Content

When using listview builder, when scroll down in maximum, that time showing a reflection, i want to hide that reflection, how to do that, here i am sharing one screenshot,

enter image description here

Here see the blue shadow, i want to remove that one, i used in listViewBuilder for this, kindly request to resolve this issue, Thankyou

3

Answers


  1. add this class

    class MyBehavior extends ScrollBehavior {
      @override
      Widget buildViewportChrome(
          BuildContext context, Widget child, AxisDirection axisDirection) {
        return child;
      }
    }
    

    now in your main.dart file add this in your Material app,

    builder: (context, child) {
      return Scaffold(
        resizeToAvoidBottomInset: false,
        body: ScrollConfiguration(
          behavior: MyBehavior(),
          child: child!,
        ),
      );
    },
    
    Login or Signup to reply.
  2. You can also use.

    physics: const BouncingScrollPhysics(),
    
    Login or Signup to reply.
  3. The reflection you are referring to is called an overscroll glow, and it appears by default when the user scrolls beyond the edges of a scrollable widget. To hide this
    overscroll glow in a listview.builder you can use the GlowingOverscrollIndicator widget and set the showLeading and showTrailing properties to false.

    for more info visit:
    https://api.flutter.dev/flutter/widgets/GlowingOverscrollIndicator-class.html

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search