2
0
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:
Oliver
2021-08-02 21:53:57 +10:00
parent 68859b3d2e
commit d47a8db289
7 changed files with 15 additions and 50 deletions

View File

@ -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(