mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Check connection now uses snackbar
This commit is contained in:
parent
00943b7536
commit
b365d8dbfb
1 changed files with 5 additions and 10 deletions
15
lib/api.dart
15
lib/api.dart
|
|
@ -111,16 +111,11 @@ class InvenTreeAPI {
|
||||||
bool checkConnection(BuildContext context) {
|
bool checkConnection(BuildContext context) {
|
||||||
// Firstly, is the server connected?
|
// Firstly, is the server connected?
|
||||||
if (!isConnected()) {
|
if (!isConnected()) {
|
||||||
showDialog(
|
|
||||||
context: context,
|
showSnackIcon(
|
||||||
child: new SimpleDialog(
|
I18N.of(context).notConnected,
|
||||||
title: new Text(I18N.of(context).notConnected),
|
success: false,
|
||||||
children: <Widget>[
|
icon: FontAwesomeIcons.server
|
||||||
ListTile(
|
|
||||||
title: Text(I18N.of(context).serverNotConnected),
|
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue