如何使列表在AppBar下方开始但在flutter中滚动到其下方?

问题描述 投票:0回答:1

最初列表应从需要的位置开始 - 不被应用栏覆盖,
但如果向下滚动,它应该位于其下方。
模糊效果会很棒。

在这个视频中他不知何故出现了这种行为。
应用程序截图

用这个代码

我尝试复制它但失败了

Scaffold(
      appBar: AppBar(
        titleSpacing: 24,
        title: Text('hello world'),
        backgroundColor: Colors.black12,
        elevation: 0,
        scrolledUnderElevation: 0,
        shape: const Border(bottom: BorderSide(color: Colors.black26)),
      ),
      extendBodyBehindAppBar: true,
      body: Column(
        children: [
          Expanded(child: List(something: something)),
          Container(
            color: Colors.red.withAlpha(50),
            height: 200,
            child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                FilledButton.icon(
                  label: const Text('this is button'),
                  onPressed: canStartLearning
                      ? () {
                          context
                              .read<Bloc>()
                              .add(DoSomething(something.toList()));
                        }
                      : null,
                ),
              ],
            ),
          ),
        ],
      ),
    );

在此输入图片描述

List looks like this:
return ListView.separated(
      padding: const EdgeInsets.all(10),
      itemCount: sentences.length,
      itemBuilder: (context, index) {
        final sentence = sentences.elementAt(index);
        return ListTile(

没有找到任何关于这个问题的信息,请帮忙

flutter listview scroll blur appbar
1个回答
0
投票

填充:const EdgeInsets.all(10), 在列表小部件中是一个问题

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.