chore: Follow up new sliverappbar in chatlist

This commit is contained in:
Krille 2023-03-22 08:54:36 +01:00
parent a76bb64d21
commit 2b75a4626d

View file

@ -19,10 +19,11 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
return SliverAppBar(
floating: true,
pinned: FluffyThemes.isColumnMode(context),
elevation: 0,
scrolledUnderElevation: 0,
backgroundColor: Colors.transparent,
pinned:
FluffyThemes.isColumnMode(context) || selectMode != SelectMode.normal,
scrolledUnderElevation: selectMode == SelectMode.normal ? 0 : null,
backgroundColor:
selectMode == SelectMode.normal ? Colors.transparent : null,
automaticallyImplyLeading: false,
leading: selectMode == SelectMode.normal
? null
@ -44,12 +45,6 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
)
: SizedBox(
height: 44,
child: Material(
elevation:
Theme.of(context).appBarTheme.scrolledUnderElevation ??
4,
shadowColor: Theme.of(context).appBarTheme.shadowColor,
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
child: TextField(
controller: controller.searchController,
textInputAction: TextInputAction.search,
@ -67,13 +62,11 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
tooltip: L10n.of(context)!.cancel,
icon: const Icon(Icons.close_outlined),
onPressed: controller.cancelSearch,
color:
Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onBackground,
)
: Icon(
Icons.search_outlined,
color:
Theme.of(context).colorScheme.onBackground,
color: Theme.of(context).colorScheme.onBackground,
),
suffixIcon: controller.isSearchMode
? controller.isSearching
@ -110,7 +103,6 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
),
),
),
),
actions: selectMode == SelectMode.share
? [
Padding(