1

The problem is that I want to have a custom padding for my title in my SliverAppBar. I set it in the FlexibleSpaceBar. The problem is that if you set the custom padding, the title goes under the back button when it collapses. It should go back to its normal AppBar position next to the back button.

Is there a way to solve this problem?

FlexibleSpaceBar(
            title: Text('Timeline',
                style: TextStyle(
                    color: Colors.black, fontWeight: FontWeight.w900)),
            titlePadding: EdgeInsetsDirectional.only(start: 20, bottom: 15),
            centerTitle: false,
          ),
        ),
tobias
  • 71
  • 1
  • 2
  • 8
  • possible duplicate https://stackoverflow.com/questions/50460629/how-to-remove-extra-padding-around-appbar-leading-icon-in-flutter – Yauhen Sampir Mar 01 '20 at 02:57
  • 1
    @YauhenSampir this is not a duplicate. He is asking how to add padding so that the title doesn't go behind the <- back button. The link you send is how to remove the padding from AppBar instead and this is about SliverAppBar -> FlexibleSpaceBar. – Teh Sunn Liu Feb 16 '21 at 17:33

0 Answers0