Вы можете следовать этому руководству https://www.youtube.com/watch?v=FPcl1tu0gDs
ИЛИ
Вот небольшой пример ожидаемого результата:
SliverAppBar(
expandedHeight: _width / 3.0,
backgroundColor: Colors.white,
leading: InkWell(
onTap: () => Navigator.of(context).pop(),
child: Container(
alignment: Alignment.center,
child: Container(
width: 30,
height: 30,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.white,
),
child: Icon(Icons.arrow_back,)),
),
),
elevation: 0.1,
title: Container(
margin: EdgeInsets.only(
left: 16,
),
child: Text(
"${widget.title}",
style: TextStyle(
color: AppTheme.black, fontSize: 24, fontWeight: FontWeight.w600),
),
),
floating: true,
pinned: true,
snap: false,
stretch: true,
centerTitle: false,
// here is custom app searcbar
flexibleSpace: CustomSearchHeader(
color: [
AppTheme.white,
AppTheme.white,
],
context: context,
width: _width,
height: _height,
onChange: (String value) {
_jobBloc.add(SearchAddress(listData: _listData, query: value));
},
),
);