Hey everyone, what’s the best way to have sizes in...
# compose
h
Hey everyone, what’s the best way to have sizes in our theme? So that I can access it like
MaterialTheme.sizes.medium
And we can specify sizes like small, medium, large (similar to shapes).
s
You can create an extension
But maybe you'll be better off having the
size
in your
AppTheme
z
Well, since we are using Kotlin, you can either have your sizes separately - e.g. in an Object or so. Another possible solution would be to extend the MaterialTheme and add a
size
to it, similarly to how
colors
,
typography
etc. are defined.