2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-08-07 04:52:08 +00:00
- Specify image size in list view
- Move "edit" button to app bar
- Display part keywords
- Allow editing of part keywords
This commit is contained in:
Oliver Walters
2021-01-21 20:53:49 +11:00
parent 65a01ff98c
commit 3096a6d25f
5 changed files with 88 additions and 43 deletions

View File

@@ -47,13 +47,15 @@ class InvenTreeModel {
String get description => jsondata['description'] ?? '';
String get notes => jsondata['notes'] ?? '';
String get notes => jsondata['notes'] as String ?? '';
int get parentId => jsondata['parent'] ?? -1;
int get parentId => jsondata['parent'] as int ?? -1;
// Legacy API provided external link as "URL", while newer API uses "link"
String get link => jsondata['link'] ?? jsondata['URL'] ?? '';
String get keywords => jsondata['keywords'] as String ?? '';
// Create a new object from JSON data (not a constructor!)
InvenTreeModel createFromJson(Map<String, dynamic> json) {