add detail page

This commit is contained in:
atseirjo
2026-01-15 11:40:09 +01:00
parent bbd6d7c49c
commit b9f379ad53
43 changed files with 942 additions and 128 deletions

View File

@@ -6,6 +6,7 @@ class FilamentModel {
final String type; // PLA, ABS, PETG, etc.
final String color;
final double weight; // in Gramm
final double weightUsed;
final double price; // Preis
final String? manufacturer;
final String? purchaseDate;
@@ -20,13 +21,14 @@ class FilamentModel {
required this.type,
required this.color,
required this.weight,
required this.weightUsed,
required this.price,
this.manufacturer,
this.purchaseDate,
this.notes,
this.pices,
this.printingTemp,
this.bedTemp,
this.bedTemp
});
// JSON Serialisierung
@@ -44,6 +46,7 @@ class FilamentModel {
'pices': pices,
'printingTemp': printingTemp,
'bedTemp': bedTemp,
'printWeightUsed': weightUsed,
};
}
@@ -55,6 +58,7 @@ class FilamentModel {
type: json['type'] as String,
color: json['color'] as String,
weight: (json['weight'] as num).toDouble(),
weightUsed: (json['weightUsed'] as num).toDouble(),
price: (json['price'] as num).toDouble(),
manufacturer: json['manufacturer'] as String?,
purchaseDate: json['purchaseDate'] as String?,
@@ -79,6 +83,7 @@ class FilamentModel {
int? pices,
int? printingTemp,
int? bedTemp,
double? weightUsed,
}) {
return FilamentModel(
id: id ?? this.id,
@@ -86,6 +91,7 @@ class FilamentModel {
type: type ?? this.type,
color: color ?? this.color,
weight: weight ?? this.weight,
weightUsed: weightUsed ?? this.weightUsed,
price: price ?? this.price,
manufacturer: manufacturer ?? this.manufacturer,
purchaseDate: purchaseDate ?? this.purchaseDate,
@@ -108,6 +114,7 @@ class FilamentModel {
type: 'PLA',
color: 'White',
weight: 1000.0,
weightUsed: 250.0,
price: 19.99,
manufacturer: '3Djake.at',
purchaseDate: formatDate(DateTime(2026, 1, 10)),
@@ -122,6 +129,7 @@ class FilamentModel {
type: 'PETG',
color: 'Black',
weight: 1000.0,
weightUsed: 0.0,
price: 9.99,
manufacturer: 'geeetech.com',
purchaseDate: formatDate(DateTime(2025, 10, 10)),
@@ -136,6 +144,7 @@ class FilamentModel {
type: 'ASA',
color: 'Black',
weight: 1000.0,
weightUsed: 150.0,
price: 16.01,
pices: 1,
manufacturer: 'tinmorry.com',