-
Notifications
You must be signed in to change notification settings - Fork 17
Description
For context, by the way, this is the application I'm working on.
It supports 1, 2, 3, 4, or 8 displays, all with customizable sizes. To make things more complicated, the 8-display has an unmovable barrier at the halfway point representing a physical hardware division.
To make a setup like this work, I use multiple containers and controllers. For example, this 8-cell layout is actually two columns, each with two rows, each with two columns again. That's a lot of controllers to manually sync up, and the build() function is very different for each configuration. Trying to change from an 8-cell layout to anything else, and then trying to set their ratios, results in errors around a mismatch of children and ratios. My current workaround is hooking into the Flutter framework and waiting for exactly 3 frames to pass to give the resizable containers enough time to recalculate. Happy to share more if needed.
It would be nice if there could be something like a ResizableGrid that takes a list of lists, or a crossAxisCount like Flutter's GridView does. It would probably come with its own controller that would make setSizes much simpler compared to my current method.
