mirror of
				https://github.com/inventree/inventree-app.git
				synced 2025-10-30 04:45:39 +00:00 
			
		
		
		
	Refactor modal form into a new stateful widget
This commit is contained in:
		| @@ -19,6 +19,7 @@ import 'package:inventree/widget/spinner.dart'; | ||||
| import 'package:inventree/widget/drawer.dart'; | ||||
|  | ||||
| class InvenTreeHomePage extends StatefulWidget { | ||||
|  | ||||
|   InvenTreeHomePage({Key? key}) : super(key: key); | ||||
|  | ||||
|   @override | ||||
|   | ||||
| @@ -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, | ||||
|         { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user