PlexSuccess<T> constructor

PlexSuccess<T>(
  1. String? body,
  2. int code
)

Implementation

PlexSuccess(String? body, this.code) {
  if (body == null || body == "") {
    response = null;
  } else {
    final String text = body;
    try {
      response = jsonDecode(text);
    } catch (e) {
      response = text.toString();
    }
  }
}