updateValue method

Future<Enumeration> updateValue(
  1. String value,
  2. String ticket
)

Implementation

Future<Enumeration> updateValue(String value, String ticket) async {
  try {
    var response = await RequestsPlus.post(
      "${Constants.tomuss}/POST",
      body: {
        'content':
            "/$year/$semester/$ue/cell/$theId/$lineId/$value?%E2%9C%80_________________________________________________________________$ticket"
      },
      bodyEncoding: RequestBodyEncoding.FormData,
    );
    if (response.statusCode != 200 || response.body != "OK!") {
      throw Exception("Error while updating value");
    }
  } catch (e) {
    rethrow;
  }
  return copyWith(value: value);
}