mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Add a connection checker
This commit is contained in:
parent
0e35c370ba
commit
37cdf23ae1
3 changed files with 51 additions and 0 deletions
|
|
@ -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)));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue