mirror of
https://github.com/inventree/inventree-app.git
synced 2025-12-22 20:13:13 +00:00
More linting work
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'package:inventree/api.dart';
|
||||
|
||||
import 'model.dart';
|
||||
import "package:inventree/api.dart";
|
||||
import "package:inventree/inventree/model.dart";
|
||||
|
||||
|
||||
/*
|
||||
@@ -9,6 +8,8 @@ import 'model.dart';
|
||||
|
||||
class InvenTreeCompany extends InvenTreeModel {
|
||||
|
||||
InvenTreeCompany() : super();
|
||||
|
||||
@override
|
||||
String get URL => "company/";
|
||||
|
||||
@@ -25,23 +26,21 @@ class InvenTreeCompany extends InvenTreeModel {
|
||||
};
|
||||
}
|
||||
|
||||
InvenTreeCompany() : super();
|
||||
String get image => (jsondata["image"] ?? jsondata["thumbnail"] ?? InvenTreeAPI.staticImage) as String;
|
||||
|
||||
String get image => (jsondata['image'] ?? jsondata['thumbnail'] ?? InvenTreeAPI.staticImage) as String;
|
||||
String get thumbnail => (jsondata["thumbnail"] ?? jsondata["image"] ?? InvenTreeAPI.staticThumb) as String;
|
||||
|
||||
String get thumbnail => (jsondata['thumbnail'] ?? jsondata['image'] ?? InvenTreeAPI.staticThumb) as String;
|
||||
String get website => (jsondata["website"] ?? "") as String;
|
||||
|
||||
String get website => (jsondata['website'] ?? '') as String;
|
||||
String get phone => (jsondata["phone"] ?? "") as String;
|
||||
|
||||
String get phone => (jsondata['phone'] ?? '') as String;
|
||||
String get email => (jsondata["email"] ?? "") as String;
|
||||
|
||||
String get email => (jsondata['email'] ?? '') as String;
|
||||
bool get isSupplier => (jsondata["is_supplier"] ?? false) as bool;
|
||||
|
||||
bool get isSupplier => (jsondata['is_supplier'] ?? false) as bool;
|
||||
bool get isManufacturer => (jsondata["is_manufacturer"] ?? false) as bool;
|
||||
|
||||
bool get isManufacturer => (jsondata['is_manufacturer'] ?? false) as bool;
|
||||
|
||||
bool get isCustomer => (jsondata['is_customer'] ?? false) as bool;
|
||||
bool get isCustomer => (jsondata["is_customer"] ?? false) as bool;
|
||||
|
||||
InvenTreeCompany.fromJson(Map<String, dynamic> json) : super.fromJson(json);
|
||||
|
||||
@@ -83,29 +82,29 @@ class InvenTreeSupplierPart extends InvenTreeModel {
|
||||
|
||||
InvenTreeSupplierPart.fromJson(Map<String, dynamic> json) : super.fromJson(json);
|
||||
|
||||
int get manufacturerId => (jsondata['manufacturer'] ?? -1) as int;
|
||||
int get manufacturerId => (jsondata["manufacturer"] ?? -1) as int;
|
||||
|
||||
String get manufacturerName => (jsondata['manufacturer_detail']['name'] ?? '') as String;
|
||||
String get manufacturerName => (jsondata["manufacturer_detail"]["name"] ?? "") as String;
|
||||
|
||||
String get manufacturerImage => (jsondata['manufacturer_detail']['image'] ?? jsondata['manufacturer_detail']['thumbnail'] ?? InvenTreeAPI.staticThumb) as String;
|
||||
String get manufacturerImage => (jsondata["manufacturer_detail"]["image"] ?? jsondata["manufacturer_detail"]["thumbnail"] ?? InvenTreeAPI.staticThumb) as String;
|
||||
|
||||
int get manufacturerPartId => (jsondata['manufacturer_part'] ?? -1) as int;
|
||||
int get manufacturerPartId => (jsondata["manufacturer_part"] ?? -1) as int;
|
||||
|
||||
int get supplierId => (jsondata['supplier'] ?? -1) as int;
|
||||
int get supplierId => (jsondata["supplier"] ?? -1) as int;
|
||||
|
||||
String get supplierName => (jsondata['supplier_detail']['name'] ?? '') as String;
|
||||
String get supplierName => (jsondata["supplier_detail"]["name"] ?? "") as String;
|
||||
|
||||
String get supplierImage => (jsondata['supplier_detail']['image'] ?? jsondata['supplier_detail']['thumbnail'] ?? InvenTreeAPI.staticThumb) as String;
|
||||
String get supplierImage => (jsondata["supplier_detail"]["image"] ?? jsondata["supplier_detail"]["thumbnail"] ?? InvenTreeAPI.staticThumb) as String;
|
||||
|
||||
String get SKU => (jsondata['SKU'] ?? '') as String;
|
||||
String get SKU => (jsondata["SKU"] ?? "") as String;
|
||||
|
||||
String get MPN => (jsondata['MPN'] ?? '') as String;
|
||||
String get MPN => (jsondata["MPN"] ?? "") as String;
|
||||
|
||||
int get partId => (jsondata['part'] ?? -1) as int;
|
||||
int get partId => (jsondata["part"] ?? -1) as int;
|
||||
|
||||
String get partImage => (jsondata["part_detail"]["thumbnail"] ?? InvenTreeAPI.staticThumb) as String;
|
||||
|
||||
String get partName => (jsondata["part_detail"]["full_name"] ?? '') as String;
|
||||
String get partName => (jsondata["part_detail"]["full_name"] ?? "") as String;
|
||||
|
||||
@override
|
||||
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
||||
@@ -132,11 +131,11 @@ class InvenTreeManufacturerPart extends InvenTreeModel {
|
||||
|
||||
InvenTreeManufacturerPart.fromJson(Map<String, dynamic> json) : super.fromJson(json);
|
||||
|
||||
int get partId => (jsondata['part'] ?? -1) as int;
|
||||
int get partId => (jsondata["part"] ?? -1) as int;
|
||||
|
||||
int get manufacturerId => (jsondata['manufacturer'] ?? -1) as int;
|
||||
int get manufacturerId => (jsondata["manufacturer"] ?? -1) as int;
|
||||
|
||||
String get MPN => (jsondata['MPN'] ?? '') as String;
|
||||
String get MPN => (jsondata["MPN"] ?? "") as String;
|
||||
|
||||
@override
|
||||
InvenTreeModel createFromJson(Map<String, dynamic> json) {
|
||||
|
||||
Reference in New Issue
Block a user