flutter 如何禁用滚动发光?

w8f9ii69  于 2023-01-09  发布在  Flutter
关注(0)|答案(1)|浏览(136)

我对Flutter还是个新手,遇到了一个问题,我不知道如何在我写的代码中删除/禁用Scrollglow。到目前为止,我看到的任何解决方案都不适合我,我不知道为什么。有人知道我该怎么做吗?

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        centerTitle: true,
        title: const Text("Fertigungsrechner"),
        backgroundColor: const Color.fromRGBO(20, 20, 20, 10.0),
      ),
      backgroundColor: const Color.fromRGBO(00, 00, 00, 50),
      body: Container(
        padding: const EdgeInsets.all(0.0), //Abstand Kacheln von Seitenrand
        child: GridView.count(
          crossAxisCount: 2,
          children: <Widget>[
            MyMenu(
              path: "/rpm",
              title: "RPM",
              icon: Icons.abc_rounded,
              warna: Colors.white,
            ),
          ],
        ),
      ),
    );
  }
}
mznpcxlj

mznpcxlj1#

GridView中,添加以下属性
physics: BouncingScrollPhysics()
滚动发光将消失。

相关问题