2022-07-06 23:12:55 +02:00
|
|
|
import 'package:photo_manager/photo_manager.dart';
|
|
|
|
|
2022-11-11 19:52:02 +02:00
|
|
|
class ErrorUploadAsset {
|
2022-07-06 23:12:55 +02:00
|
|
|
final String id;
|
2023-02-19 18:44:53 +02:00
|
|
|
final DateTime fileCreatedAt;
|
2022-07-06 23:12:55 +02:00
|
|
|
final String fileName;
|
|
|
|
final String fileType;
|
|
|
|
final AssetEntity asset;
|
|
|
|
final String errorMessage;
|
|
|
|
|
|
|
|
const ErrorUploadAsset({
|
|
|
|
required this.id,
|
2023-02-19 18:44:53 +02:00
|
|
|
required this.fileCreatedAt,
|
2022-07-06 23:12:55 +02:00
|
|
|
required this.fileName,
|
|
|
|
required this.fileType,
|
|
|
|
required this.asset,
|
|
|
|
required this.errorMessage,
|
|
|
|
});
|
|
|
|
|
|
|
|
ErrorUploadAsset copyWith({
|
|
|
|
String? id,
|
2023-02-19 18:44:53 +02:00
|
|
|
DateTime? fileCreatedAt,
|
2022-07-06 23:12:55 +02:00
|
|
|
String? fileName,
|
|
|
|
String? fileType,
|
|
|
|
AssetEntity? asset,
|
|
|
|
String? errorMessage,
|
|
|
|
}) {
|
|
|
|
return ErrorUploadAsset(
|
|
|
|
id: id ?? this.id,
|
2023-02-19 18:44:53 +02:00
|
|
|
fileCreatedAt: fileCreatedAt ?? this.fileCreatedAt,
|
2022-07-06 23:12:55 +02:00
|
|
|
fileName: fileName ?? this.fileName,
|
|
|
|
fileType: fileType ?? this.fileType,
|
|
|
|
asset: asset ?? this.asset,
|
|
|
|
errorMessage: errorMessage ?? this.errorMessage,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
String toString() {
|
2023-02-19 18:44:53 +02:00
|
|
|
return 'ErrorUploadAsset(id: $id, fileCreatedAt: $fileCreatedAt, fileName: $fileName, fileType: $fileType, asset: $asset, errorMessage: $errorMessage)';
|
2022-07-06 23:12:55 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
2022-11-11 19:52:02 +02:00
|
|
|
bool operator ==(Object other) {
|
|
|
|
if (identical(this, other)) return true;
|
|
|
|
|
|
|
|
return other is ErrorUploadAsset &&
|
|
|
|
other.id == id &&
|
2023-02-19 18:44:53 +02:00
|
|
|
other.fileCreatedAt == fileCreatedAt &&
|
2022-11-11 19:52:02 +02:00
|
|
|
other.fileName == fileName &&
|
|
|
|
other.fileType == fileType &&
|
|
|
|
other.asset == asset &&
|
|
|
|
other.errorMessage == errorMessage;
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode {
|
|
|
|
return id.hashCode ^
|
2023-02-19 18:44:53 +02:00
|
|
|
fileCreatedAt.hashCode ^
|
2022-11-11 19:52:02 +02:00
|
|
|
fileName.hashCode ^
|
|
|
|
fileType.hashCode ^
|
|
|
|
asset.hashCode ^
|
|
|
|
errorMessage.hashCode;
|
2022-07-06 23:12:55 +02:00
|
|
|
}
|
|
|
|
}
|