Is there a way to specify multiple Provide composa...
# compose
s
Is there a way to specify multiple Provide composables to save indentation? Something like:
Copy code
Provide(textStyle = TextSyle(...), emphasis = EmphasisAmbient.current.medium) {
    ...
}
y
Provides
takes a vararg, so you could do it, but some "helper provide" functions like
ProvidesEmphasis
are doing additional stuff. So you would need to copy/paste some code, which might be changed in a future release
s
Alright
`Providers`* , right?
y
Yes sorry
But I do agree that having to nest 2 block very often for textStyle and emphasis is cumbersome. Easily fixed with an extension for textStyle+emphasis though
s
Yeah it's a good thing to add to the library
l
In the future these custom
Provide
functions will hopefully go away and you can just use
Providers
like you would for any other Ambient - but currently we need the
Provide
functions as they do more than just setting a value.
s
That would be great
1