This commit is contained in:
Márton Kiss
2023-05-26 21:25:00 +02:00
parent 9e3b805fdd
commit 1558794e93
528 changed files with 38239 additions and 37732 deletions

View File

@@ -1,32 +1,32 @@
import 'package:file_picker/file_picker.dart';
import 'package:filcnaplo_kreta_api/client/api.dart';
class Attachment {
Map? json;
int id;
PlatformFile? file;
String name;
String? fileId;
String kretaFilePath;
Attachment({
required this.id,
this.file,
required this.name,
this.fileId,
required this.kretaFilePath,
this.json,
});
factory Attachment.fromJson(Map json) {
return Attachment(
id: json["azonosito"],
name: (json["fajlNev"] ?? "attachment").trim(),
kretaFilePath: json["utvonal"] ?? "",
json: json,
);
}
String get downloadUrl => KretaAPI.downloadAttachment(id.toString());
bool get isImage => name.endsWith(".jpg") || name.endsWith(".jpeg") || name.endsWith(".png");
}
import 'package:file_picker/file_picker.dart';
import 'package:filcnaplo_kreta_api/client/api.dart';
class Attachment {
Map? json;
int id;
PlatformFile? file;
String name;
String? fileId;
String kretaFilePath;
Attachment({
required this.id,
this.file,
required this.name,
this.fileId,
required this.kretaFilePath,
this.json,
});
factory Attachment.fromJson(Map json) {
return Attachment(
id: json["azonosito"],
name: (json["fajlNev"] ?? "attachment").trim(),
kretaFilePath: json["utvonal"] ?? "",
json: json,
);
}
String get downloadUrl => KretaAPI.downloadAttachment(id.toString());
bool get isImage => name.endsWith(".jpg") || name.endsWith(".jpeg") || name.endsWith(".png");
}