mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 10:15:32 +00:00
More code cleanup
This commit is contained in:
@ -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