mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-06-07 18:02:48 +08:00
user search TextField horizontal align and case insensitive
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
462fa5999f
commit
55b43f4612
@ -120,6 +120,7 @@ class _MyGroupState extends State<MyGroup> {
|
||||
}
|
||||
|
||||
Widget _buildLeftHeader() {
|
||||
final fontSize = 14.0;
|
||||
return Row(
|
||||
children: [
|
||||
Expanded(
|
||||
@ -128,16 +129,16 @@ class _MyGroupState extends State<MyGroup> {
|
||||
onChanged: (value) {
|
||||
searchUserText.value = value;
|
||||
},
|
||||
textAlignVertical: TextAlignVertical.center,
|
||||
style: TextStyle(fontSize: fontSize),
|
||||
decoration: InputDecoration(
|
||||
filled: false,
|
||||
prefixIcon: Icon(
|
||||
Icons.search_rounded,
|
||||
color: Theme.of(context).hintColor,
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(vertical: 10),
|
||||
).paddingOnly(top: 2),
|
||||
hintText: translate("Search"),
|
||||
hintStyle:
|
||||
TextStyle(fontSize: 14, color: Theme.of(context).hintColor),
|
||||
hintStyle: TextStyle(fontSize: fontSize),
|
||||
border: InputBorder.none,
|
||||
isDense: true,
|
||||
),
|
||||
@ -150,7 +151,9 @@ class _MyGroupState extends State<MyGroup> {
|
||||
return Obx(() {
|
||||
final items = gFFI.groupModel.users.where((p0) {
|
||||
if (searchUserText.isNotEmpty) {
|
||||
return p0.name.contains(searchUserText.value);
|
||||
return p0.name
|
||||
.toLowerCase()
|
||||
.contains(searchUserText.value.toLowerCase());
|
||||
}
|
||||
return true;
|
||||
}).toList();
|
||||
|
Loading…
Reference in New Issue
Block a user