diff --git a/lib/main.dart b/lib/main.dart index a28c6a27..f8c2762f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -200,6 +200,18 @@ class _MyHomePageState extends State { Navigator.push(context, MaterialPageRoute(builder: (context) => SupplierListWidget())); } + void _manufacturers() { + if (!InvenTreeAPI().checkConnection(context)) return; + + Navigator.push(context, MaterialPageRoute(builder: (context) => ManufacturerListWidget())); + } + + void _customers() { + if (!InvenTreeAPI().checkConnection(context)) return; + + Navigator.push(context, MaterialPageRoute(builder: (context) => CustomerListWidget())); + } + void _unsupported() { showDialog( context: context, @@ -293,14 +305,40 @@ class _MyHomePageState extends State { Text('Stock'), ], ), + ], + ), + Spacer(), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ Column( children: [ IconButton( - icon: new FaIcon(FontAwesomeIcons.industry), - tooltip: 'Suppliers', - onPressed: _suppliers, + icon: new FaIcon(FontAwesomeIcons.building), + tooltip: "Suppliers", + onPressed: _suppliers, ), Text("Suppliers"), + ], + ), + Column( + children: [ + IconButton( + icon: FaIcon(FontAwesomeIcons.industry), + tooltip: "Manufacturers", + onPressed: _manufacturers, + ), + Text("Manufacturers") + ], + ), + Column( + children: [ + IconButton( + icon: FaIcon(FontAwesomeIcons.userTie), + tooltip: "Customers", + onPressed: _customers, + ), + Text("Customers"), ] ) ],