mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 05:26:47 +00:00
Check connection now uses snackbar
This commit is contained in:
parent
00943b7536
commit
b365d8dbfb
15
lib/api.dart
15
lib/api.dart
@ -111,16 +111,11 @@ class InvenTreeAPI {
|
||||
bool checkConnection(BuildContext context) {
|
||||
// Firstly, is the server connected?
|
||||
if (!isConnected()) {
|
||||
showDialog(
|
||||
context: context,
|
||||
child: new SimpleDialog(
|
||||
title: new Text(I18N.of(context).notConnected),
|
||||
children: <Widget>[
|
||||
ListTile(
|
||||
title: Text(I18N.of(context).serverNotConnected),
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
showSnackIcon(
|
||||
I18N.of(context).notConnected,
|
||||
success: false,
|
||||
icon: FontAwesomeIcons.server
|
||||
);
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user