type 'List<Widget?>' is not a subtype of type 'List<Widget>' in type cast
rpungin opened this issue · comments
Raphael Pungin commented
Get this error on line 260 of sliver_expandable_list.dart
///By default, build a Column widget for layout all children's size.
static Widget buildDefaultContent(
BuildContext context, ExpandableSectionContainerInfo containerInfo) {
var childDelegate = containerInfo.childDelegate!;
var children = List<Widget?>.generate(childDelegate.childCount!,
(index) => childDelegate.builder(context, index));
return Column(
children: children as List<Widget>, //line 260
);
}
Raphael Pungin commented
Raphael Pungin commented
This is the build method of my widget that uses ExpandableListView
return ExpandableListView(
builder: SliverExpandableChildDelegate<GameSummary, GamesListSection>(
sectionList: sectionList,
headerBuilder: (context, sectionIndex, index) =>
Text(sectionList[sectionIndex].title),
itemBuilder: (context, sectionIndex, itemIndex, index) {
GameSummary gameSummary =
sectionList[sectionIndex].items[itemIndex];
return GameSummaryWidget(
gameSummary,
onTap: (gameId) {},
);
}));
tp7309 commented
I has pushed a new version1.0.0-nullsafety.1
.