Andrey Kuzovlev
Andrey Kuzovlev

Reputation: 1

How to make list start below the AppBar but scroll underneath it in flutter?

Initially list should start where it needs to be - not covered by app bar,
but if scroll down it should go underneath it.
For Blur effect would be great.

In this video somehow he got this behavior.
app screenshot

with this code

I tried to replicate it but failed

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,
                ),
              ],
            ),
          ),
        ],
      ),
    );

enter image description here

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(

Find nothin on this problem, pls help

Upvotes: -1

Views: 30

Answers (1)

Andrey Kuzovlev
Andrey Kuzovlev

Reputation: 1

padding: const EdgeInsets.all(10), in list widget was a problem

Upvotes: 0

Related Questions