build method
Widget
build([
- dynamic item1,
- dynamic item2,
- dynamic item3,
- dynamic item4,
- dynamic item5,
- dynamic item6,
- dynamic item7,
- dynamic item8,
- dynamic item9,
- dynamic item10,
Implementation
Widget build([item1, item2, item3, item4, item5, item6, item7, item8, item9, item10]) {
final items = [];
[item1, item2, item3, item4, item5, item6, item7, item8, item9, item10].forEach((element) {
if (element == null) return;
if (element is Iterable) {
items.addAll(element);
} else {
items.add(element);
}
});
return applyTo(items, this._layout);
}