0

How Could I Implement this kind of effect? I tried two SilverAppBar but it leads to a big blank strip between the two bars!

It's the same effect on the Facebook Mobile application on the home page.

import 'package:flutter/material.dart';

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          Expanded(
            child: CustomScrollView(
              slivers: [
                SliverAppBar(
                  title: Text('The App'),

                ),
                SliverAppBar(
                  title: Row(
                    children: List<Widget>.generate(
                        6, (index) => Icon(Icons.access_alarm,color: Colors.grey,)),
                    mainAxisAlignment: MainAxisAlignment.spaceAround,
                  ),
                  pinned: true,
                  backgroundColor: Colors.white,
                ),
                SliverList(
                    delegate: SliverChildListDelegate(List<Widget>.generate(
                        100, (index) => Text(index.toString()))))
              ],
            ),
          ),
        ],
      ),
    );
  }
}
ॐ Rakesh Kumar
  • 1,318
  • 1
  • 14
  • 24
Adham Nour
  • 15
  • 6

0 Answers0