getStoryList function Null safety

List<Widget> getStoryList(
  1. List<StoryItem> storiesMapList
)

Implementation

List<Widget> getStoryList(List<StoryItem> storiesMapList) {
  List<Widget> imagesList = [];
  for (int i = 0; i < storiesMapList.length; i++) {
    for (int j = 0; j < storiesMapList[i].stories.length; j++) {
      imagesList.add(storiesMapList[i].stories[j]);
    }
  }
  return imagesList;
}