mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Add "starred parts" to home screen
This commit is contained in:
parent
e53170ed7e
commit
ddafed1fe6
5 changed files with 130 additions and 10 deletions
|
|
@ -299,6 +299,15 @@ class InvenTreePart extends InvenTreeModel {
|
|||
return img.isNotEmpty ? img : InvenTreeAPI.staticThumb;
|
||||
}
|
||||
|
||||
// Return the "starred" status of this part
|
||||
bool get starred => jsondata['starred'] as bool ?? false;
|
||||
|
||||
// Toggle the starred status
|
||||
Future<void> setStarred(BuildContext context, bool status) async {
|
||||
// TODO - Toggle the "starred" status of the part using the API
|
||||
return;
|
||||
}
|
||||
|
||||
InvenTreePart() : super();
|
||||
|
||||
InvenTreePart.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue