[GroupInfoScreen] Fix search textfield design
Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
@@ -612,7 +612,10 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
body: UsersBloc(
|
body: UsersBloc(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
_buildTextInputSection(modalSetState),
|
Padding(
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
|
child: _buildTextInputSection(modalSetState),
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: UserListView(
|
child: UserListView(
|
||||||
selectedUsers: {},
|
selectedUsers: {},
|
||||||
@@ -690,66 +693,57 @@ class _GroupInfoScreenState extends State<GroupInfoScreen> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildTextInputSection(modalSetState) {
|
Widget _buildTextInputSection(modalSetState) {
|
||||||
|
final theme = StreamChatTheme.of(context);
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
|
||||||
height: 16.0,
|
|
||||||
),
|
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
SizedBox(
|
|
||||||
width: 16.0,
|
|
||||||
),
|
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextField(
|
child: Container(
|
||||||
controller: _searchController,
|
height: 36,
|
||||||
cursorColor: StreamChatTheme.of(context).colorTheme.black,
|
child: TextField(
|
||||||
autofocus: true,
|
controller: _searchController,
|
||||||
decoration: InputDecoration(
|
cursorColor: theme.colorTheme.black,
|
||||||
isDense: true,
|
autofocus: true,
|
||||||
prefixIconConstraints: BoxConstraints.tight(Size(36.0, 44.0)),
|
decoration: InputDecoration(
|
||||||
prefixIcon: Padding(
|
hintText: 'Search',
|
||||||
padding: const EdgeInsets.symmetric(
|
hintStyle: theme.textTheme.body.copyWith(
|
||||||
vertical: 2.0, horizontal: 6.0),
|
color: theme.colorTheme.grey,
|
||||||
child: StreamSvgIcon.search(
|
|
||||||
color: StreamChatTheme.of(context).colorTheme.black,
|
|
||||||
),
|
),
|
||||||
|
prefixIconConstraints: BoxConstraints.tight(Size(40, 24)),
|
||||||
|
prefixIcon: StreamSvgIcon.search(
|
||||||
|
color: theme.colorTheme.black,
|
||||||
|
size: 24,
|
||||||
|
),
|
||||||
|
enabledBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(24.0),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: theme.colorTheme.greyWhisper,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(24.0),
|
||||||
|
borderSide: BorderSide(
|
||||||
|
color: theme.colorTheme.greyWhisper,
|
||||||
|
)),
|
||||||
|
contentPadding: const EdgeInsets.all(0),
|
||||||
),
|
),
|
||||||
hintText: 'Search',
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(32.0),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: StreamChatTheme.of(context)
|
|
||||||
.colorTheme
|
|
||||||
.black
|
|
||||||
.withOpacity(0.08)),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(32.0),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: StreamChatTheme.of(context)
|
|
||||||
.colorTheme
|
|
||||||
.black
|
|
||||||
.withOpacity(0.08)),
|
|
||||||
),
|
|
||||||
contentPadding: EdgeInsets.zero,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(width: 16.0),
|
||||||
width: 8.0,
|
|
||||||
),
|
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: StreamSvgIcon.close_small(
|
icon: StreamSvgIcon.close_small(
|
||||||
color: StreamChatTheme.of(context)
|
color: theme.colorTheme.grey,
|
||||||
.colorTheme
|
|
||||||
.black
|
|
||||||
.withOpacity(0.5),
|
|
||||||
),
|
),
|
||||||
onPressed: () {
|
constraints: BoxConstraints.tightFor(
|
||||||
Navigator.pop(context);
|
height: 24,
|
||||||
},
|
width: 24,
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
splashRadius: 24,
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user