add some new features

This commit is contained in:
2026-10-29 15:03:48 +01:00
parent c876405a8f
commit 20012db615
39 changed files with 2908 additions and 97 deletions
+20 -1
View File
@@ -35,6 +35,9 @@ class BauteilModel {
final double gewichtGramm;
final double abfallGramm;
final double? gesamtpreis;
final double? abfallKosten;
final double? materialKosten;
final double? aufschlagProzent;
final List<BauteilFilamentModel> filamente;
final String? fotoBase64;
@@ -48,6 +51,9 @@ class BauteilModel {
required this.abfallGramm,
required this.filamente,
this.gesamtpreis,
this.abfallKosten,
this.materialKosten,
this.aufschlagProzent,
this.fotoBase64,
});
@@ -65,6 +71,10 @@ class BauteilModel {
BauteilModel copyWith({
required String bauteilId,
required DateTime erstelltAm,
double? abfallKosten,
double? materialKosten,
double? aufschlagProzent,
double? gesamtpreis,
}) => BauteilModel(
bauteilId: bauteilId,
erstelltAm: erstelltAm,
@@ -73,7 +83,10 @@ class BauteilModel {
druckdauerMinuten: druckdauerMinuten,
gewichtGramm: gewichtGramm,
abfallGramm: abfallGramm,
gesamtpreis: gesamtpreis,
gesamtpreis: gesamtpreis ?? this.gesamtpreis,
abfallKosten: abfallKosten ?? this.abfallKosten,
materialKosten: materialKosten ?? this.materialKosten,
aufschlagProzent: aufschlagProzent ?? this.aufschlagProzent,
filamente: filamente,
fotoBase64: fotoBase64,
);
@@ -87,6 +100,9 @@ class BauteilModel {
'gewichtGramm': gewichtGramm,
'abfallGramm': abfallGramm,
'gesamtpreis': gesamtpreis,
'abfallKosten': abfallKosten,
'materialKosten': materialKosten,
'aufschlagProzent': aufschlagProzent,
'filamente': filamente.map((item) => item.toJson()).toList(),
'fotoBase64': fotoBase64,
};
@@ -100,6 +116,9 @@ class BauteilModel {
gewichtGramm: (json['gewichtGramm'] as num).toDouble(),
abfallGramm: (json['abfallGramm'] as num).toDouble(),
gesamtpreis: (json['gesamtpreis'] as num?)?.toDouble(),
abfallKosten: (json['abfallKosten'] as num?)?.toDouble(),
materialKosten: (json['materialKosten'] as num?)?.toDouble(),
aufschlagProzent: (json['aufschlagProzent'] as num?)?.toDouble(),
fotoBase64: json['fotoBase64'] as String?,
filamente: (json['filamente'] as List)
.map(