update edit and list and detail view
This commit is contained in:
@@ -11,7 +11,7 @@ class FilamentModel {
|
||||
final String? manufacturer;
|
||||
final String? purchaseDate;
|
||||
final String? notes;
|
||||
final int? pices;
|
||||
final int pices;
|
||||
final int? printingTemp;
|
||||
final int? bedTemp;
|
||||
|
||||
@@ -26,9 +26,9 @@ class FilamentModel {
|
||||
this.manufacturer,
|
||||
this.purchaseDate,
|
||||
this.notes,
|
||||
this.pices,
|
||||
required this.pices,
|
||||
this.printingTemp,
|
||||
this.bedTemp
|
||||
this.bedTemp,
|
||||
});
|
||||
|
||||
// JSON Serialisierung
|
||||
@@ -46,7 +46,7 @@ class FilamentModel {
|
||||
'pices': pices,
|
||||
'printingTemp': printingTemp,
|
||||
'bedTemp': bedTemp,
|
||||
'printWeightUsed': weightUsed,
|
||||
'weightUsed': weightUsed,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -57,13 +57,13 @@ class FilamentModel {
|
||||
name: json['name'] as String,
|
||||
type: json['type'] as String,
|
||||
color: json['color'] as String,
|
||||
weight: (json['weight'] as num).toDouble(),
|
||||
weightUsed: (json['weightUsed'] as num).toDouble(),
|
||||
weight: (json['weight'] as num?)?.toDouble() ?? 0.0,
|
||||
weightUsed: (json['weightUsed'] as num?)?.toDouble() ?? 0.0,
|
||||
price: (json['price'] as num).toDouble(),
|
||||
manufacturer: json['manufacturer'] as String?,
|
||||
purchaseDate: json['purchaseDate'] as String?,
|
||||
notes: json['notes'] as String?,
|
||||
pices: json['pices'] as int?,
|
||||
pices: json['pices'] as int,
|
||||
printingTemp: json['printingTemp'] as int?,
|
||||
bedTemp: json['bedTemp'] as int?,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user