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

Add a connection checker

This commit is contained in:
Oliver Walters
2020-04-06 22:33:38 +10:00
parent 0e35c370ba
commit 37cdf23ae1
3 changed files with 51 additions and 0 deletions

View File

@ -179,18 +179,27 @@ class _MyHomePageState extends State<MyHomePage> {
}
void _search() {
if (!InvenTreeAPI().checkConnection(context)) return;
// TODO
}
void _scan() {
if (!InvenTreeAPI().checkConnection(context)) return;
scanQrCode(context);
}
void _parts() {
if (!InvenTreeAPI().checkConnection(context)) return;
Navigator.push(context, MaterialPageRoute(builder: (context) => CategoryDisplayWidget(null)));
}
void _stock() {
if (!InvenTreeAPI().checkConnection(context)) return;
Navigator.push(context, MaterialPageRoute(builder: (context) => LocationDisplayWidget(null)));
}