2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-30 22:46:49 +00:00

Improve server status message

This commit is contained in:
Oliver Walters 2020-04-04 15:42:47 +11:00
parent d536174fb9
commit 29c28aad91

View File

@ -146,6 +146,9 @@ class _MyHomePageState extends State<MyHomePage> {
}).catchError((e) {
_serverConnection = false;
_serverStatusColor = Color.fromARGB(255, 250, 50, 50);
_serverStatus = "Error connecting to $_serverAddress";
if (e is TimeoutException) {
_serverMessage = "No response from server";
@ -282,10 +285,13 @@ class _MyHomePageState extends State<MyHomePage> {
children: <Widget>[
Text('$_serverStatus',
style: TextStyle(
color: _serverStatusColor,
color: _serverStatusColor,
),
),
Text('$_serverMessage',
style: TextStyle(
color: _serverStatusColor,
),
),
Text('$_serverMessage'
),
],
),