copyWith method

UsersLoaded copyWith({
  1. List<User>? users,
  2. bool? hasMore,
  3. Set<String>? selectedUsers,
  4. bool? isLoadingMore,
  5. String? searchKeyword,
})

Create a copy of this state with updated fields

Implementation

UsersLoaded copyWith({
  List<User>? users,
  bool? hasMore,
  Set<String>? selectedUsers,
  bool? isLoadingMore,
  String? searchKeyword,
}) {
  return UsersLoaded(
    users: users ?? this.users,
    hasMore: hasMore ?? this.hasMore,
    selectedUsers: selectedUsers ?? this.selectedUsers,
    isLoadingMore: isLoadingMore ?? this.isLoadingMore,
    searchKeyword: searchKeyword ?? this.searchKeyword,
  );
}