So I have the following screen:
I am looking for a way to make it possible that when the user scrolls up, the widget which contains the progress bar and those 4 data fields (ItemHeader) will scroll up, but the search container (SearchTextField) will be pinned (to the top). Of course when the user will scroll down it should reappear.
All the solutions that I have found address cases where there is a use of tabs. Code added below, Thanks!
Scaffold(
backgroundColor: Theme.of(context).backgroundColor,
appBar: MyAppBar(
true,
title: constructParentName,
parentTitle: siteParentName,
),
endDrawer: MyDrawer(),
body: _isLoading
? Center(
child: CircularProgressIndicator(),
)
: Column(
children: <Widget>[
ItemHeader("24", "23", "33"), //This is the widget I would like to hide while scrolling up
SearchTextField(controller),
Expanded(
child: ListView.builder(
itemBuilder: (BuildContext context, int i) {
return filter == null || filter == ""
? ItemDetail(
itemId: subconstructs[i].subconstructId,
itemName: subconstructs[i].subconstructName,
tasksDone: subconstructs[i].tasksDone,
tasksRejected: subconstructs[i].tasksRejected,
tasksPending: subconstructs[i].tasksPending,
authToken: authToken,
constructParentId: constructParentId,
siteParentId: siteAncestorId,
callBack: () {
return PageEnum.Subconstructs;
},
)
: subconstructs[i]
.subconstructName
.toString()
.toLowerCase()
.contains(filter.toLowerCase())
? ItemDetail(
itemId: subconstructs[i].subconstructId,
itemName: subconstructs[i].subconstructName,
tasksDone: subconstructs[i].tasksDone,
tasksRejected: subconstructs[i].tasksRejected,
tasksPending: subconstructs[i].tasksPending,
authToken: authToken,
constructParentId: constructParentId,
siteParentId: siteAncestorId,
callBack: () {
return PageEnum.Subconstructs;
},
)
: new Container();
},
itemCount: subconstructs.length,
),
),
],
),
bottomNavigationBar: buildBottomNavBar(),
);