mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Refactoring
This commit is contained in:
parent
1d05fdbe50
commit
7304484369
6 changed files with 28 additions and 16 deletions
|
|
@ -3,7 +3,7 @@ import 'package:InvenTree/api.dart';
|
|||
import 'package:InvenTree/inventree/part.dart';
|
||||
import 'package:InvenTree/preferences.dart';
|
||||
|
||||
import 'package:InvenTree/widget/part_display.dart';
|
||||
import 'package:InvenTree/widget/part_detail.dart';
|
||||
import 'package:InvenTree/widget/drawer.dart';
|
||||
|
||||
import 'package:flutter/cupertino.dart';
|
||||
|
|
@ -164,6 +164,9 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
|
|||
InvenTreePreferences().expandCategoryList = !InvenTreePreferences().expandCategoryList;
|
||||
});
|
||||
},
|
||||
onLongPress: () {
|
||||
// TODO - Context menu for e.g. creating a new PartCategory
|
||||
},
|
||||
);
|
||||
},
|
||||
body: SubcategoryList(_subcategories),
|
||||
|
|
@ -180,6 +183,9 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
|
|||
InvenTreePreferences().expandPartList = !InvenTreePreferences().expandPartList;
|
||||
});
|
||||
},
|
||||
onLongPress: () {
|
||||
// TODO - Context menu for e.g. creating a new Part
|
||||
},
|
||||
);
|
||||
},
|
||||
body: PartList(_parts),
|
||||
|
|
@ -249,7 +255,7 @@ class PartList extends StatelessWidget {
|
|||
InvenTreePart().get(pk).then((var part) {
|
||||
if (part is InvenTreePart) {
|
||||
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => PartDisplayWidget(part)));
|
||||
Navigator.push(context, MaterialPageRoute(builder: (context) => PartDetailWidget(part)));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue