StackLayout doesn't fill all of the spacing using .fillEqualSpacing distribution if non-zero spacing parameter is passed.
The problem is in StackLayout.distributionConfig where it calculates the axisSpacing not taking into account the spaces that were already added during the measurement phase. Actual excessAxisLength for .fillEqualSpacing should be increased by numberOfSpaces * spacing so it can be redistrubuted.
See this example playground gist to reproduce the following screenshot:
StackLayout
doesn't fill all of the spacing using.fillEqualSpacing
distribution if non-zerospacing
parameter is passed.The problem is in
StackLayout.distributionConfig
where it calculates theaxisSpacing
not taking into account the spaces that were already added during themeasurement
phase. ActualexcessAxisLength
for.fillEqualSpacing
should be increased bynumberOfSpaces * spacing
so it can be redistrubuted.See this example playground gist to reproduce the following screenshot:
The expected behavior IMHO looks like this: