fromResponse static method

List<CategoryEntity> fromResponse({
  1. required GetCategoriesResponse response,
})

Implementation

static List<CategoryEntity> fromResponse({
  required GetCategoriesResponse response,
}) =>
    response.categories
        ?.map(
          (CategoryResponse category) => CategoryMapper.fromResponse(
            response: category,
          ),
        )
        .toList() ??
    <CategoryEntity>[];