2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-05-01 06:56:50 +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) { }).catchError((e) {
_serverConnection = false; _serverConnection = false;
_serverStatusColor = Color.fromARGB(255, 250, 50, 50);
_serverStatus = "Error connecting to $_serverAddress";
if (e is TimeoutException) { if (e is TimeoutException) {
_serverMessage = "No response from server"; _serverMessage = "No response from server";
@ -285,7 +288,10 @@ class _MyHomePageState extends State<MyHomePage> {
color: _serverStatusColor, color: _serverStatusColor,
), ),
), ),
Text('$_serverMessage' Text('$_serverMessage',
style: TextStyle(
color: _serverStatusColor,
),
), ),
], ],
), ),