Hide/Show searchBar on channel list scroll
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
+10
-11
@@ -457,14 +457,17 @@ class _ChannelListPageState extends State<ChannelListPage> {
|
|||||||
},
|
},
|
||||||
child: ChannelsBloc(
|
child: ChannelsBloc(
|
||||||
child: MessageSearchBloc(
|
child: MessageSearchBloc(
|
||||||
child: Column(
|
child: NestedScrollView(
|
||||||
children: [
|
floatHeaderSlivers: true,
|
||||||
SearchTextField(
|
headerSliverBuilder: (_, __) => [
|
||||||
|
SliverToBoxAdapter(
|
||||||
|
child: SearchTextField(
|
||||||
controller: _controller,
|
controller: _controller,
|
||||||
showCloseButton: _isSearchActive,
|
showCloseButton: _isSearchActive,
|
||||||
),
|
),
|
||||||
Expanded(
|
),
|
||||||
child: AnimatedSwitcher(
|
],
|
||||||
|
body: AnimatedSwitcher(
|
||||||
duration: const Duration(milliseconds: 350),
|
duration: const Duration(milliseconds: 350),
|
||||||
child: GestureDetector(
|
child: GestureDetector(
|
||||||
behavior: HitTestBehavior.opaque,
|
behavior: HitTestBehavior.opaque,
|
||||||
@@ -492,8 +495,7 @@ class _ChannelListPageState extends State<ChannelListPage> {
|
|||||||
physics: AlwaysScrollableScrollPhysics(),
|
physics: AlwaysScrollableScrollPhysics(),
|
||||||
child: ConstrainedBox(
|
child: ConstrainedBox(
|
||||||
constraints: BoxConstraints(
|
constraints: BoxConstraints(
|
||||||
minHeight:
|
minHeight: viewportConstraints.maxHeight,
|
||||||
viewportConstraints.maxHeight,
|
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -554,8 +556,7 @@ class _ChannelListPageState extends State<ChannelListPage> {
|
|||||||
),
|
),
|
||||||
channelWidget: ChannelPage(),
|
channelWidget: ChannelPage(),
|
||||||
onViewInfoTap: (channel) {
|
onViewInfoTap: (channel) {
|
||||||
if (channel.memberCount == 2 &&
|
if (channel.memberCount == 2 && channel.isDistinct) {
|
||||||
channel.isDistinct) {
|
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
context,
|
context,
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
@@ -583,8 +584,6 @@ class _ChannelListPageState extends State<ChannelListPage> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user