From e8a4a387ea2acd0b80ee6e48753d42ae7ce5c5b6 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 18 Apr 2020 22:07:10 +1000 Subject: [PATCH] More options for main screen --- lib/main.dart | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) 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"), ] ) ],