mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-15 03:35:28 +00:00
More code cleanup
This commit is contained in:
@ -326,7 +326,7 @@ class SubcategoryList extends StatelessWidget {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
/*
|
||||
* Widget for displaying a list of Part objects within a PartCategory display.
|
||||
*
|
||||
* Uses server-side pagination for snappy results
|
||||
|
@ -1,8 +1,6 @@
|
||||
|
||||
import 'package:inventree/api.dart';
|
||||
import 'package:inventree/inventree/company.dart';
|
||||
import 'package:inventree/widget/dialogs.dart';
|
||||
import 'package:inventree/widget/fields.dart';
|
||||
import 'package:inventree/widget/refreshable_state.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
@ -384,7 +384,7 @@ class SublocationList extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Widget for displaying a list of stock items within a stock location.
|
||||
*
|
||||
* Users server-side pagination for snappy results
|
||||
|
@ -35,8 +35,6 @@ class PartDetailWidget extends StatefulWidget {
|
||||
|
||||
class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
|
||||
final _editImageKey = GlobalKey<FormState>();
|
||||
|
||||
@override
|
||||
String getAppBarTitle(BuildContext context) => L10().partDetails;
|
||||
|
||||
@ -102,34 +100,6 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload image for this Part.
|
||||
* Show a SnackBar with upload result.
|
||||
*/
|
||||
void _uploadImage(File? image) async {
|
||||
|
||||
if (image == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final result = await part.uploadImage(image);
|
||||
|
||||
if (result) {
|
||||
showSnackIcon(
|
||||
L10().imageUploadSuccess,
|
||||
success: true
|
||||
);
|
||||
|
||||
refresh();
|
||||
|
||||
} else {
|
||||
showSnackIcon(
|
||||
L10().imageUploadFailure,
|
||||
success: false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void _editPartDialog(BuildContext context) {
|
||||
|
||||
launchApiForm(
|
||||
|
Reference in New Issue
Block a user