doomAll method

Future<List<Map<String, dynamic>>> doomAll()

Implementation

Future<List<Map<String, dynamic>>> doomAll() async {
  Response resp = await _placeProvider.doomAllInfo();
  dynamic body = resp.body;

  dynamic convertBody = convertUtf8ToObject(body);
  List<Map<String, dynamic>> dat = [];
  for (dynamic d in convertBody["data"]) {
    dat.add(convertUtf8ToObject(d));
  }

  ServerMultiRespDto serverRespDto =
      ServerMultiRespDto.fromJson(convertBody, dat);

  if (serverRespDto.code == 1) {
    List<dynamic> temp = serverRespDto.data;
    List<Map<String, dynamic>> data = [];
    for (dynamic d in temp) {
      data.add(convertUtf8ToObject(d));
    }
    return data;
  } else {
    return [];
  }
}