toList method Null safety

List<ContactConsentContactingPermissionModel> toList(
  1. List<Map<String, dynamic>>? rawItems
)

Implementation

static List<ContactConsentContactingPermissionModel> toList(
    List<Map<String, dynamic>>? rawItems) {
  if (rawItems == null) {
    return [];
  }

  List<ContactConsentContactingPermissionModel> items = [];
  for (int i = 0; i < rawItems.length; i++) {
    items.add(ContactConsentContactingPermissionModel.fromJson(rawItems[i]));
  }

  return items;
}