caduandrade / multi_split_view

Provides horizontal or vertical multiple split view for Flutter.
MIT License
157 stars 29 forks source link

The divider does not move when the widget's size includes a tiny fractional value. #78

Closed caduandrade closed 4 months ago

caduandrade commented 4 months ago

This small fraction causes floating point to generate inappropriate subtraction. This results in incorrect behavior in LayoutConstraints.adjustAreas.

It was detected on Windows but it is possible to simulate with:

Padding(
          padding: const EdgeInsets.fromLTRB(0.000000001,16,16,16),
          child: MultiSplitViewTheme(
              data: MultiSplitViewThemeData(
                  dividerPainter: DividerPainters.grooved2()),
              child: multiSplitView))
caduandrade commented 4 months ago

Version 3.2.2 released

lorenzogiarola commented 4 months ago

Hi, i'm still encountering this bug, but I manage to solve it using the multi split view widget inside a sized box, where i set height and width to their max values, floored to double. I also have to round to double each area size in the multi split view controller.