searchUsers method
- String query
Searches for users with the given query
.
The query
is matched against the User.username, User.firstname, User.lastname and User.vintage.
Implementation
List<User> searchUsers(String query) {
return state
.where(
(user) =>
user.username.containsIgnoreCase(query) ||
user.firstname.containsIgnoreCase(query) ||
user.lastname.containsIgnoreCase(query) ||
user.vintage.containsIgnoreCase(query),
)
.toList();
}