[GroupInfoScreen] Fix search textfield design

Signed-off-by: Sahil Kumar <[email protected]>
This commit is contained in:
Sahil Kumar
2021-01-15 14:14:42 +05:30
parent 6fac5c9dd1
commit 89e17eb296
+33 -39
View File
@@ -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: Container(
height: 36,
child: TextField( child: TextField(
controller: _searchController, controller: _searchController,
cursorColor: StreamChatTheme.of(context).colorTheme.black, cursorColor: theme.colorTheme.black,
autofocus: true, autofocus: true,
decoration: InputDecoration( decoration: InputDecoration(
isDense: true,
prefixIconConstraints: BoxConstraints.tight(Size(36.0, 44.0)),
prefixIcon: Padding(
padding: const EdgeInsets.symmetric(
vertical: 2.0, horizontal: 6.0),
child: StreamSvgIcon.search(
color: StreamChatTheme.of(context).colorTheme.black,
),
),
hintText: 'Search', hintText: 'Search',
border: OutlineInputBorder( hintStyle: theme.textTheme.body.copyWith(
borderRadius: BorderRadius.circular(32.0), color: theme.colorTheme.grey,
),
prefixIconConstraints: BoxConstraints.tight(Size(40, 24)),
prefixIcon: StreamSvgIcon.search(
color: theme.colorTheme.black,
size: 24,
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(24.0),
borderSide: BorderSide( borderSide: BorderSide(
color: StreamChatTheme.of(context) color: theme.colorTheme.greyWhisper,
.colorTheme ),
.black
.withOpacity(0.08)),
), ),
focusedBorder: OutlineInputBorder( focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(32.0), borderRadius: BorderRadius.circular(24.0),
borderSide: BorderSide( borderSide: BorderSide(
color: StreamChatTheme.of(context) color: theme.colorTheme.greyWhisper,
.colorTheme )),
.black contentPadding: const EdgeInsets.all(0),
.withOpacity(0.08)),
),
contentPadding: EdgeInsets.zero,
), ),
), ),
), ),
SizedBox(
width: 8.0,
), ),
SizedBox(width: 16.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),
) )
], ],
), ),