Code:
CustomScrollView(
slivers: <Widget>[
SliverAppBar(
expandedHeight: 200.0,
flexibleSpace: FlexibleSpaceBar(
title: Container(color: Colors.red, child: Text("Flexible title")),
background: Image.asset("assets/chocolate.jpg", fit: BoxFit.cover),
),
),
SliverList(delegate: SliverChildListDelegate(_buildChildren())),
],
);
Why there is a default padding in the title. I used Container to bring contrast so that the margin can be visible easily. Even I tried using centerTitle: false and it didn't change anything.
