Source Code added
This commit is contained in:
parent
800376eafd
commit
9efa9bc6dd
3912 changed files with 754770 additions and 2 deletions
28
mobile/lib/models/search/search_result.model.dart
Normal file
28
mobile/lib/models/search/search_result.model.dart
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
import 'package:collection/collection.dart';
|
||||
|
||||
import 'package:immich_mobile/entities/asset.entity.dart';
|
||||
|
||||
class SearchResult {
|
||||
final List<Asset> assets;
|
||||
final int? nextPage;
|
||||
|
||||
const SearchResult({required this.assets, this.nextPage});
|
||||
|
||||
SearchResult copyWith({List<Asset>? assets, int? nextPage}) {
|
||||
return SearchResult(assets: assets ?? this.assets, nextPage: nextPage ?? this.nextPage);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() => 'SearchResult(assets: $assets, nextPage: $nextPage)';
|
||||
|
||||
@override
|
||||
bool operator ==(covariant SearchResult other) {
|
||||
if (identical(this, other)) return true;
|
||||
final listEquals = const DeepCollectionEquality().equals;
|
||||
|
||||
return listEquals(other.assets, assets) && other.nextPage == nextPage;
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => assets.hashCode ^ nextPage.hashCode;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue