wrapMeList static method
Implementation
static List<Widget> wrapMeList(
List<Widget>? header,
List<Widget> children,
List<Widget>? footer,
) {
var rst = <Widget>[];
rst.addAll(header ?? []);
for (var i = 0; i < children.length; i++) {
var child = children[i];
assert(() {
if (child.key == null) {
throw FlutterError(
'Every item of ReorderableGridView must have a key.',
);
}
return true;
}());
rst.add(ReorderableItemView(
key: child.key!,
index: i,
indexInAll: i + (header?.length?? 0),
child: child,
));
}
rst.addAll(footer ?? []);
return rst;
}