verticalView method

Widget verticalView()

Implementation

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