Skip to content

Commit b7e7c0d

Browse files
committed
search bar design
1 parent c4ea35a commit b7e7c0d

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

sample_app/lib/widgets/channel_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ class _ChannelListDefault extends StatelessWidget {
116116

117117
@override
118118
Widget build(BuildContext context) {
119+
final chatTheme = StreamChatTheme.of(context);
119120
return SlidableAutoCloseBehavior(
120121
child: RefreshIndicator(
121122
onRefresh: channelListController.refresh,
122123
child: StreamChannelListView(
123124
controller: channelListController,
124125
itemBuilder: (context, channels, index, defaultWidget) {
125-
final chatTheme = StreamChatTheme.of(context);
126126
final channel = channels[index];
127127
final backgroundColor = chatTheme.colorTheme.inputBg;
128128
final canDeleteChannel = channel.canDeleteChannel;

sample_app/lib/widgets/search_text_field.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,19 @@ class SearchTextField extends StatelessWidget {
2525
final textTheme = context.streamTextTheme;
2626

2727
return Container(
28-
height: 36,
28+
height: 44,
2929
decoration: BoxDecoration(
3030
color: Colors.transparent,
3131
border: Border.all(
3232
color: colorScheme.borderDefault,
3333
),
3434
borderRadius: BorderRadius.circular(24),
3535
),
36-
margin: const EdgeInsets.symmetric(
37-
vertical: 8,
38-
horizontal: 8,
36+
margin: EdgeInsets.only(
37+
top: spacing.md,
38+
bottom: spacing.xs,
39+
left: spacing.md,
40+
right: spacing.md,
3941
),
4042
child: Row(
4143
children: [
@@ -45,7 +47,7 @@ class SearchTextField extends StatelessWidget {
4547
controller: controller,
4648
onChanged: onChanged,
4749
decoration: InputDecoration(
48-
prefixIconConstraints: BoxConstraints.tight(const Size(40, 24)),
50+
prefixIconConstraints: BoxConstraints.tight(const Size(36, 24)),
4951
prefixIcon: Padding(
5052
padding: EdgeInsets.only(left: spacing.md),
5153
child: Icon(
@@ -58,7 +60,6 @@ class SearchTextField extends StatelessWidget {
5860
hintStyle: textTheme.bodyDefault.copyWith(
5961
color: colorScheme.textTertiary,
6062
),
61-
contentPadding: EdgeInsets.zero,
6263
border: OutlineInputBorder(
6364
borderSide: BorderSide.none,
6465
borderRadius: BorderRadius.circular(24),

0 commit comments

Comments
 (0)