mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 12:06:24 +00:00
Format Code and Add Format Checks to CI (#643)
* Remove unused lib/generated/i18n.dart * Use `fvm dart format .` * Add contributing guidelines * Enforce dart format * Add `dart format off` directive to generated files
This commit is contained in:
parent
e9db6532e4
commit
4444884afa
100 changed files with 5332 additions and 5592 deletions
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import "package:inventree/inventree/model.dart";
|
||||
import "package:inventree/inventree/part.dart";
|
||||
|
||||
|
|
@ -6,13 +5,13 @@ import "package:inventree/inventree/part.dart";
|
|||
* Class representing the BomItem database model
|
||||
*/
|
||||
class InvenTreeBomItem extends InvenTreeModel {
|
||||
|
||||
InvenTreeBomItem() : super();
|
||||
|
||||
InvenTreeBomItem.fromJson(Map<String, dynamic> json) : super.fromJson(json);
|
||||
|
||||
@override
|
||||
InvenTreeModel createFromJson(Map<String, dynamic> json) => InvenTreeBomItem.fromJson(json);
|
||||
InvenTreeModel createFromJson(Map<String, dynamic> json) =>
|
||||
InvenTreeBomItem.fromJson(json);
|
||||
|
||||
@override
|
||||
String get URL => "bom/";
|
||||
|
|
@ -28,7 +27,7 @@ class InvenTreeBomItem extends InvenTreeModel {
|
|||
|
||||
// Extract the 'reference' value associated with this BomItem
|
||||
String get reference => getString("reference");
|
||||
|
||||
|
||||
// Extract the 'quantity' value associated with this BomItem
|
||||
double get quantity => getDouble("quantity");
|
||||
|
||||
|
|
@ -57,8 +56,8 @@ class InvenTreeBomItem extends InvenTreeModel {
|
|||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// Extract the ID of the related sub-part
|
||||
int get subPartId => getInt("sub_part");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue