From 49886655fd35840922513018b74a27359f5232fb Mon Sep 17 00:00:00 2001 From: josiadmin Date: Fri, 16 Jan 2026 15:00:14 +0100 Subject: [PATCH] mod methodes --- lib/controllers/edit_controller.dart | 2 +- lib/pages/details_view.dart | 13 ++++++------- lib/widgets/filament_card.dart | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/controllers/edit_controller.dart b/lib/controllers/edit_controller.dart index 3a1eb09..9d4fe08 100644 --- a/lib/controllers/edit_controller.dart +++ b/lib/controllers/edit_controller.dart @@ -76,7 +76,7 @@ class EditController extends GetxController { manufacturerController.text = filament.manufacturer ?? ''; purchaseDateController.text = filament.purchaseDate ?? ''; notesController.text = filament.notes ?? ''; - piecesController.text = filament.pices?.toString() ?? ''; + piecesController.text = filament.pices.toString(); printingTempController.text = filament.printingTemp?.toString() ?? ''; bedTempController.text = filament.bedTemp?.toString() ?? ''; } diff --git a/lib/pages/details_view.dart b/lib/pages/details_view.dart index d6946c9..fe9d5e6 100644 --- a/lib/pages/details_view.dart +++ b/lib/pages/details_view.dart @@ -181,13 +181,12 @@ class DetailsPage extends GetView { value: '${filament.bedTemp}°C', color: Colors.red, ), - if (filament.pices != null) - DetailInfoCard( - icon: Icons.inventory_2, - label: 'Anzahl Rollen', - value: '${filament.pices}', - color: Colors.purple, - ), + DetailInfoCard( + icon: Icons.inventory_2, + label: 'Anzahl Rollen', + value: '${filament.pices}', + color: Colors.purple, + ), if (filament.manufacturer != null) DetailInfoCard( icon: Icons.business, diff --git a/lib/widgets/filament_card.dart b/lib/widgets/filament_card.dart index 7d9fb33..1a87f00 100644 --- a/lib/widgets/filament_card.dart +++ b/lib/widgets/filament_card.dart @@ -161,7 +161,7 @@ class FilamentCard extends StatelessWidget { label: filament.price.toStringAsFixed(2), color: Colors.orange, ), - if (filament.pices != null && filament.pices! > 0) + if (filament.pices > 0) _buildDetailChip( icon: Icons.inventory_2, label: '${filament.pices} Stk.',