2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 10:15:32 +00:00

Refactor modal form into a new stateful widget

This commit is contained in:
Oliver
2021-07-22 17:49:43 +10:00
parent 885df45138
commit 64aed4b31a
3 changed files with 126 additions and 88 deletions

View File

@ -60,7 +60,9 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
IconButton(
icon: FaIcon(FontAwesomeIcons.edit),
tooltip: L10().edit,
onPressed: _editPartDialog,
onPressed: () {
_editPartDialog(context);
},
)
);
}
@ -170,7 +172,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
);
}
void _editPartDialog() {
void _editPartDialog(BuildContext context) {
// Values which can be edited
var _name;
@ -180,6 +182,7 @@ class _PartDisplayState extends RefreshableState<PartDetailWidget> {
var _link;
launchApiForm(
context,
L10().editPart,
part.url,
{