Untitled

mail@pastecode.io avatar
unknown
dart
2 years ago
413 B
1
Indexable
Never
static Future getStateByDeviceID() async {
    var headers = <String, String>{'Authorization': basicAuth};
    Response r = await get(
        Uri.http(url, "driverTablet/getStateByDeviceID/" + Constant.deviceID),
        headers: headers);

    if (r.body.contains('"Result":null')) {
      return null;
    } else {
      var json = jsonDecode(r.body);

      return GetStateByDeviceID.fromJson(json);
    }
  }