You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
According to latest blog from Chris Banes. It's better to always provide a Modifier to Composable.
Describe the solution you'd like
Any composable you write which emits layout (even a simple Box), should have a modifier: Modifier parameter, which is then used in the layout.
Sample code from the blog
/**
* This now has a modifier parameter, allowing callers
* to customize the layout, behavior and more!
*/
@Composable
private fun HeaderText(
text: String,
modifier: Modifier = Modifier,
) {
Text(
modifier = modifier,
// ...
)
}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
According to latest blog from
Chris Banes
. It's better to always provide aModifier
toComposable
.Link to blog - https://chris.banes.dev/always-provide-a-modifier/
Describe the solution you'd like
Any composable you write which emits layout (even a simple Box), should have a
modifier: Modifier
parameter, which is then used in thelayout
.Sample code from the blog
The text was updated successfully, but these errors were encountered: