본문 바로가기

Flutter

[j Flutter] Listview scroll glow 지우기

728x90
반응형

 

1.

ListView.builder(
    physics: BouncingScrollPhysics(),
}

 

 

2. 파일 만들고 적용

import 'package:flutter/material.dart';

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

 

ScrollConfiguration(
  behavior: NoGlowScrollBehavior(),
  child: ListView.builder(
    itemCount: 10,
    itemBuilder: (BuildContext context, int index) {
      return Text('Item $index');
    },
  ),
);
728x90
반응형