getList static method

List<DashboardProfile> getList(
  1. Map<String, dynamic>? json
)

Implementation

static List<DashboardProfile> getList(Map<String, dynamic>? json) {
  List<DashboardProfile> dashboardProfiles = [];

  if (json != null &&
      json.runtimeType != Null &&
      json.toString() != 'null' &&
      json.containsKey('body')) {
    var list = json['body'] as List;
    dashboardProfiles =
        list.map((item) => DashboardProfile.fromJson(item)).toList();
  }

  return dashboardProfiles;
}