google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.38k stars 596 forks source link

[Flow layouts] Compose Foundation new APIs doesn't allow SpaceEvenly + spacing #1654

Closed LouisCAD closed 1 year ago

LouisCAD commented 1 year ago

Hello, the FlowRow in accompanist is getting deprecated, but feature parity isn't there.

In the FlowRow from Compose Foundation 1.5.0-beta01 (currently the latest), there's no equivalent to mainAxisSpacing when you want SpaceEvenly arrangement/alignement since spacedBy cannot be used it at the moment.

Can you revert the deprecation of FlowRow in Accompanist until this is supported in Compose Foundation? I'm personally passing the following parameters to my FlowRows and haven't found a viable alternative:

FlowRow(
    Modifier.fillMaxWidth(),
    mainAxisAlignment = MainAxisAlignment.SpaceEvenly,
    mainAxisSpacing = 16.dp
) {
    // content
}

Thank you and have a great day!

bentrengrove commented 1 year ago

Thanks for filling the issue. I would definitely encourage you to file that as a feature request at goo.gle/compose-feedback and I will tag in @uchennafokoye here to see it.

We won't be reverting the deprecation as it is an important signal to people to start moving to the Compose Foundation version but it won't be removed from Accompanist for a long time so you can continue to use the Accompanist version if it meets your needs.