checkSever static method

Future<ServerStatus> checkSever()

Implementation

static Future<ServerStatus> checkSever() async {
  try {
    var response = await http.post(
      Methods.getURI('/Data/CheckConnectionInfo'),
    );
    var serverStatus = ServerStatus.fromCode(
      Methods.toInt(json.decode(response.body).toString()),
    );
    return serverStatus;
  } catch (e) {
    HandleException.log(e);
    return ServerStatus.unknown;
  }
}