ChildExpanded constructor
Implementation
ChildExpanded({Key? key, required this.child, this.flex = 1, this.itemCount = 1}) : super(key: key) {
if (itemCount != 1) {
if (itemCount % 2 == 0) {
mainFlex = 2;
marginFlex = (((itemCount * 2) - 2) ~/ 2);
} else {
mainFlex = 1;
marginFlex = (itemCount - 1) ~/ 2;
}
}else{
mainFlex=1;
}
}