mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-17 14:30:40 +01:00
chore: Follow up chatlist appbar design
This commit is contained in:
parent
b50355f33e
commit
7c6874ed65
@ -19,7 +19,6 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
|
|
||||||
return AppBar(
|
return AppBar(
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
scrolledUnderElevation: selectMode == SelectMode.normal ? 0 : null,
|
|
||||||
leading: selectMode == SelectMode.normal
|
leading: selectMode == SelectMode.normal
|
||||||
? null
|
? null
|
||||||
: IconButton(
|
: IconButton(
|
||||||
@ -38,25 +37,14 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
controller.selectedRoomIds.length.toString(),
|
controller.selectedRoomIds.length.toString(),
|
||||||
key: const ValueKey(SelectMode.select),
|
key: const ValueKey(SelectMode.select),
|
||||||
)
|
)
|
||||||
: Material(
|
: TextField(
|
||||||
color: Theme.of(context).brightness == Brightness.light
|
|
||||||
? Colors.white
|
|
||||||
: Colors.black,
|
|
||||||
borderRadius: const BorderRadius.only(
|
|
||||||
topLeft: Radius.circular(AppConfig.borderRadius),
|
|
||||||
topRight: Radius.circular(AppConfig.borderRadius),
|
|
||||||
),
|
|
||||||
elevation: 4,
|
|
||||||
shadowColor:
|
|
||||||
Theme.of(context).colorScheme.onBackground.withAlpha(64),
|
|
||||||
child: TextField(
|
|
||||||
controller: controller.searchController,
|
controller: controller.searchController,
|
||||||
textInputAction: TextInputAction.search,
|
textInputAction: TextInputAction.search,
|
||||||
onChanged: controller.onSearchEnter,
|
onChanged: controller.onSearchEnter,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
border: const UnderlineInputBorder(
|
border: const UnderlineInputBorder(
|
||||||
borderSide: BorderSide.none),
|
borderSide: BorderSide.none,
|
||||||
filled: false,
|
),
|
||||||
hintText: controller.activeSpacesEntry.getName(context),
|
hintText: controller.activeSpacesEntry.getName(context),
|
||||||
prefixIcon: controller.isSearchMode
|
prefixIcon: controller.isSearchMode
|
||||||
? IconButton(
|
? IconButton(
|
||||||
@ -69,8 +57,7 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
onPressed: Scaffold.of(context).openDrawer,
|
onPressed: Scaffold.of(context).openDrawer,
|
||||||
icon: Icon(
|
icon: Icon(
|
||||||
Icons.menu,
|
Icons.menu,
|
||||||
color:
|
color: Theme.of(context).colorScheme.onBackground,
|
||||||
Theme.of(context).colorScheme.onBackground,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
suffixIcon: Row(
|
suffixIcon: Row(
|
||||||
@ -114,7 +101,6 @@ class ChatListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
actions: selectMode == SelectMode.share
|
actions: selectMode == SelectMode.share
|
||||||
? null
|
? null
|
||||||
: selectMode == SelectMode.select
|
: selectMode == SelectMode.select
|
||||||
|
Loading…
x
Reference in New Issue
Block a user