arrange static method
Implementation
static Widget arrange(List<Images> imgs) {
if (imgs.length == 1) {
return one(imgs[0], double.infinity, 300);
} else if (imgs.length == 2) {
return rowPair(imgs);
} else if (imgs.length == 3) {
return Row(children: [
Flexible(flex: 5, child: one(imgs[0], 400, 300)),
Flexible(
flex: 2,
child: columnPair([imgs[1], imgs[2]]),
)
]);
} else if (imgs.length == 4) {
return Column(children: [
rowPair([imgs[0], imgs[1]]),
rowPair([imgs[2], imgs[3]]),
]);
} else {
// TODO over 5
throw Exception("embed.type images length: ${imgs.length}");
}
}