mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
.empty() -> []
Turns out .empty() creates an empty list which is fixed length!
This commit is contained in:
parent
dd39b98ae9
commit
40613c9c36
11 changed files with 16 additions and 16 deletions
|
|
@ -149,7 +149,7 @@ class InvenTreePart extends InvenTreeModel {
|
|||
}
|
||||
|
||||
// Cached list of stock items
|
||||
List<InvenTreeStockItem> stockItems = List<InvenTreeStockItem>.empty();
|
||||
List<InvenTreeStockItem> stockItems = [];
|
||||
|
||||
int get stockItemCount => stockItems.length;
|
||||
|
||||
|
|
@ -175,7 +175,7 @@ class InvenTreePart extends InvenTreeModel {
|
|||
int get supplier_count => (jsondata['suppliers'] ?? 0) as int;
|
||||
|
||||
// Cached list of test templates
|
||||
List<InvenTreePartTestTemplate> testingTemplates = List<InvenTreePartTestTemplate>.empty();
|
||||
List<InvenTreePartTestTemplate> testingTemplates = [];
|
||||
|
||||
int get testTemplateCount => testingTemplates.length;
|
||||
|
||||
|
|
@ -277,7 +277,7 @@ class InvenTreePart extends InvenTreeModel {
|
|||
|
||||
if (fn.isNotEmpty) return fn;
|
||||
|
||||
List<String> elements = List<String>.empty();
|
||||
List<String> elements = [];
|
||||
|
||||
if (IPN.isNotEmpty) elements.add(IPN);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue