2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 02:05:29 +00:00

Add more buttons to the main screen

- Currently just display an "unsupported" dialog
This commit is contained in:
Oliver Walters
2020-04-05 22:19:40 +10:00
parent 15d5bf3fb5
commit 0cc210cf2b
2 changed files with 58 additions and 4 deletions

View File

@ -194,8 +194,19 @@ class _MyHomePageState extends State<MyHomePage> {
Navigator.push(context, MaterialPageRoute(builder: (context) => LocationDisplayWidget(null)));
}
void _suppliers() {
// TODO
void _unsupported() {
showDialog(
context: context,
child: new SimpleDialog(
title: new Text("Unsupported"),
children: <Widget>[
ListTile(
title: Text("This feature is not yet supported"),
subtitle: Text("It will be supported in an upcoming release"),
)
],
)
);
}
@override
@ -259,7 +270,7 @@ class _MyHomePageState extends State<MyHomePage> {
Column(
children: <Widget>[
IconButton(
icon: new Icon(Icons.category),
icon: new FaIcon(FontAwesomeIcons.shapes),
tooltip: 'Parts',
onPressed: _parts,
),
@ -281,7 +292,7 @@ class _MyHomePageState extends State<MyHomePage> {
IconButton(
icon: new FaIcon(FontAwesomeIcons.industry),
tooltip: 'Suppliers',
onPressed: _suppliers,
onPressed: _unsupported,
),
Text("Suppliers"),
]
@ -289,6 +300,42 @@ class _MyHomePageState extends State<MyHomePage> {
],
),
Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: <Widget>[
Column(
children: <Widget>[
IconButton(
icon: new FaIcon(FontAwesomeIcons.tools),
tooltip: "Build",
onPressed: _unsupported,
),
Text("Build"),
],
),
Column(
children: <Widget>[
IconButton(
icon: new FaIcon(FontAwesomeIcons.shoppingCart),
tooltip: "Order",
onPressed: _unsupported,
),
Text("Order"),
]
),
Column(
children: <Widget>[
IconButton(
icon: new FaIcon(FontAwesomeIcons.shippingFast),
tooltip: "Sell",
onPressed: _unsupported,
),
Text("Sell"),
]
)
],
),
Spacer(),
Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,