2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 18:25:26 +00:00

Capture context data in the LocationDisplay widget

This commit is contained in:
Oliver Walters
2020-04-15 10:33:10 +10:00
parent 5ed13e69aa
commit 3fead77f6d
7 changed files with 42 additions and 56 deletions

View File

@ -56,7 +56,7 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
int pk = category?.pk ?? -1;
// Request a list of sub-categories under this one
InvenTreePartCategory().list(filters: {"parent": "$pk"}).then((var cats) {
InvenTreePartCategory().list(context, filters: {"parent": "$pk"}).then((var cats) {
_subcategories.clear();
for (var cat in cats) {
@ -70,7 +70,7 @@ class _CategoryDisplayState extends State<CategoryDisplayWidget> {
});
// Request a list of parts under this category
InvenTreePart().list(filters: {"category": "$pk"}).then((var parts) {
InvenTreePart().list(context, filters: {"category": "$pk"}).then((var parts) {
_parts.clear();
for (var part in parts) {