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:
@ -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)));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user