Layout widgets in a grid using stack

Viewed 27

I'm trying to layout square widgets in a stack based on a coordinate system, I know I could do this with a CustomRenderObject but I'm just curious why the stack doesn't layout in a grid when the children have positioned relative rects like this:

RelativeRect.fromRect(
  Offset(
    position%layoutData.width, 
    position~/layoutData.width
  ) & const Size(1,1), 
  Offset.zero & Size(layoutData.width,layoutData.height)
)

would love to know if there is maybe some other way to layout in a grid, and still be able to use the PositionedTransition animation widget or something similar

0 Answers
Related