visualizzazione file dei servizi e copia nei file del cliente
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:equatable/equatable.dart';
|
||||
|
||||
class ServiceFileModel extends Equatable {
|
||||
@@ -7,7 +9,8 @@ class ServiceFileModel extends Equatable {
|
||||
final String extension;
|
||||
final String url;
|
||||
final String serviceId;
|
||||
final int fileSize; // <--- Aggiunto
|
||||
final int fileSize;
|
||||
final Uint8List? localBytes;
|
||||
|
||||
const ServiceFileModel({
|
||||
this.id,
|
||||
@@ -17,6 +20,7 @@ class ServiceFileModel extends Equatable {
|
||||
required this.url,
|
||||
required this.serviceId,
|
||||
required this.fileSize,
|
||||
this.localBytes,
|
||||
});
|
||||
|
||||
// Trasforma i byte in qualcosa di leggibile (KB, MB, GB)
|
||||
@@ -39,6 +43,7 @@ class ServiceFileModel extends Equatable {
|
||||
String? url,
|
||||
String? serviceId,
|
||||
int? fileSize,
|
||||
Uint8List? localBytes,
|
||||
}) {
|
||||
return ServiceFileModel(
|
||||
id: id ?? this.id,
|
||||
@@ -48,6 +53,7 @@ class ServiceFileModel extends Equatable {
|
||||
url: url ?? this.url,
|
||||
serviceId: serviceId ?? this.serviceId,
|
||||
fileSize: fileSize ?? this.fileSize,
|
||||
localBytes: localBytes ?? this.localBytes,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user