MenuSectionEntriesResponse.fromResponse constructor

MenuSectionEntriesResponse.fromResponse(
  1. Response response
)

Implementation

MenuSectionEntriesResponse.fromResponse(Response response)
    : super.fromResponse(response) {
  List<MenuSectionEntry> menuSectionEntries = [];
  if (response.statusCode == 200) {
    response.data['results'].forEach(
        (entry) => menuSectionEntries.add(MenuSectionEntry.fromJson(entry)));
  }
  this.menuSectionEntries = menuSectionEntries;
}