is there a way to access `dimensionResource` insid...
# compose
k
is there a way to access
dimensionResource
inside a
constrainScope
for setting constraint margins?
c
You cannot do that, since the
constrainScope
lambda is not
@Composable
. You have to save the dimens to variable in
@Composable
context, and access that in the
constraintScope
.
k
thats what i am doing now. Its not a big issue but it would be nice to be able to directly reference dimensionResource especially now when compose does not support dimension value buckets (e.g. values-sw300) yet.
c
I absolutely agree with you. Maybe it is worth to file an issue.