horizontalView method
Implementation
Widget horizontalView() {
return SizedBox(
height: size,
child: Column(
children: [
for (int i = 0; i < crossAxisCount; i += crossAxisCount)
Padding(
padding: EdgeInsets.only(
bottom: i != children.length - 1 ? mainAxisSpacing : 0,
),
child: SizedBox(
height: size / crossAxisCount,
child: Row(
children: [
for (
int j = i;
j < i + (children.length ~/ crossAxisCount) + 1;
j++
)
j < children.length
? Expanded(
child: Padding(
padding: EdgeInsets.only(
right: j != i + crossAxisCount
? crossAxisSpacing
: 0,
),
child: children[j],
),
)
: const Spacer(),
],
),
),
),
],
),
);
}