Lavmee / constraintlayout-compose-multiplatform

Useful when implementing larger layouts with more complicated alignment requirements.
Apache License 2.0
160 stars 5 forks source link

Incorrect gaps when using createFlow() #95

Open romanpechegin opened 5 days ago

romanpechegin commented 5 days ago

When using verticalGap and horizontalGap, gaps are not calculated correctly. Probably a toPx() call is missing somewhere.

createFlow(
      elements = refs.toTypedArray(),
      horizontalGap = 16.dp,
      verticalGap = 16.dp,
      wrapMode = Wrap.Chain,
      verticalAlign = VerticalAlign.Top
)

If you specify 16.dp.toPx().dp then everything works fine