fromJsons static method

List fromJsons(
  1. String data
)

Implementation

static List fromJsons(String data) {
  if (data.isEmptyJson) {
    return [];
  }
  try {
    var objs = json.decode(data);
    if (objs is! List) {
      return [];
    }
    return objs;
  } catch (e) {
    return [];
  }
}