Skip to content

Commit

Permalink
Merge branch 'feat/searchBar' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
opjoobe committed Aug 4, 2022
2 parents 87db38a + 7766633 commit 7151ed8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/screens/contacts/contacts.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class _ContactsPageState extends State<ContactsPage> {
// 순서 유지되는지 확인하기
setState(() {
friends = friendsStash
.where((x) => friendsData[x].nickname.startsWith(text))
.where((x) => friendsData[x].nickname.toLowerCase().startsWith(text))
.toList();
});
}
Expand Down Expand Up @@ -237,7 +237,7 @@ class _ContactsPageState extends State<ContactsPage> {
child: TextField(
controller: _controller,
onChanged: (text) async {
searchContacts(text);
searchContacts(text.toLowerCase());
},
decoration: InputDecoration(
hintText: 'Search...',
Expand Down
7 changes: 4 additions & 3 deletions lib/screens/message/chat_list_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ class _ChatPageState extends State<ChatPage> {
padding: EdgeInsets.only(top: 16, left: 16, right: 16),
child: TextField(
onChanged: (text) {
searchConversation(text);
searchConversation(text.toLowerCase());
},
decoration: InputDecoration(
hintText: 'Search...',
Expand Down Expand Up @@ -309,8 +309,9 @@ class _ChatPageState extends State<ChatPage> {
);
}
chatUsers = chatUsers
.where(
(x) => x.friendName.startsWith(searchText))
.where((x) => x.friendName
.toLowerCase()
.startsWith(searchText))
.toList();

return ListView.builder(
Expand Down

0 comments on commit 7151ed8

Please sign in to comment.