颤动如何从ListView中删除过卷效果

时间:2018-05-29 07:48:11

标签: flutter

如何从ListView中删除过度滚动效果(Android上的圆形叠加效果,在iOS上反弹)

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Title',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        body: Center(
          child: ListView.builder(
              shrinkWrap: true,
              itemCount: 3,
              itemBuilder: (BuildContext context, int index) {
                return Text('Some text');
              }),
        ),
      ),
    );
  }
}

感谢。这里有更多文本来补偿代码/文本比率

1 个答案:

答案 0 :(得分:2)

修改

这应该使用自定义ScrollConfiguration来完成。更多细节How to remove scroll glow?