mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 03:56:24 +00:00
More code cleanup
This commit is contained in:
parent
68859b3d2e
commit
d47a8db289
7 changed files with 15 additions and 50 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue