mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
chore: Follow up new sliverappbar in chatlist
This commit is contained in:
parent
d211dd4aeb
commit
ede1e289ce
@ -19,10 +19,11 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
|
|
||||||
return SliverAppBar(
|
return SliverAppBar(
|
||||||
floating: true,
|
floating: true,
|
||||||
pinned: FluffyThemes.isColumnMode(context),
|
pinned:
|
||||||
elevation: 0,
|
FluffyThemes.isColumnMode(context) || selectMode != SelectMode.normal,
|
||||||
scrolledUnderElevation: 0,
|
scrolledUnderElevation: selectMode == SelectMode.normal ? 0 : null,
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor:
|
||||||
|
selectMode == SelectMode.normal ? Colors.transparent : null,
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
leading: selectMode == SelectMode.normal
|
leading: selectMode == SelectMode.normal
|
||||||
? null
|
? null
|
||||||
@ -44,12 +45,6 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
)
|
)
|
||||||
: SizedBox(
|
: SizedBox(
|
||||||
height: 44,
|
height: 44,
|
||||||
child: Material(
|
|
||||||
elevation:
|
|
||||||
Theme.of(context).appBarTheme.scrolledUnderElevation ??
|
|
||||||
4,
|
|
||||||
shadowColor: Theme.of(context).appBarTheme.shadowColor,
|
|
||||||
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
|
||||||
child: TextField(
|
child: TextField(
|
||||||
controller: controller.searchController,
|
controller: controller.searchController,
|
||||||
textInputAction: TextInputAction.search,
|
textInputAction: TextInputAction.search,
|
||||||
@ -67,13 +62,11 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
tooltip: L10n.of(context)!.cancel,
|
tooltip: L10n.of(context)!.cancel,
|
||||||
icon: const Icon(Icons.close_outlined),
|
icon: const Icon(Icons.close_outlined),
|
||||||
onPressed: controller.cancelSearch,
|
onPressed: controller.cancelSearch,
|
||||||
color:
|
color: Theme.of(context).colorScheme.onBackground,
|
||||||
Theme.of(context).colorScheme.onBackground,
|
|
||||||
)
|
)
|
||||||
: Icon(
|
: Icon(
|
||||||
Icons.search_outlined,
|
Icons.search_outlined,
|
||||||
color:
|
color: Theme.of(context).colorScheme.onBackground,
|
||||||
Theme.of(context).colorScheme.onBackground,
|
|
||||||
),
|
),
|
||||||
suffixIcon: controller.isSearchMode
|
suffixIcon: controller.isSearchMode
|
||||||
? controller.isSearching
|
? controller.isSearching
|
||||||
@ -110,7 +103,6 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
actions: selectMode == SelectMode.share
|
actions: selectMode == SelectMode.share
|
||||||
? [
|
? [
|
||||||
Padding(
|
Padding(
|
||||||
|
Loading…
Reference in New Issue
Block a user