Nikhil
05/30/2021, 5:54 PMDrawModifier
and I’m drawing the shadows using contentDrawScope
provided by DrawModifier
.
1. First of all, Is this a correct to extend the modifiers?
2. To render the shadows(GradientDrawable) smoothly, I’m using RenderScript (I know it’s going to be deprecated in the Android12. I’ll migrate.). I need context
param to invoke renderscript api. Is it okay to pass context
param in the Modifier?Nikhil
05/30/2021, 5:56 PMDerek Ellis
05/30/2021, 8:13 PMLocalContext
instead of having to pass it in as a parameter?Nikhil
05/31/2021, 4:11 AMLocalContext.current
needs to be called from another @Composable
function.
This is simple ModifierDerek Ellis
05/31/2021, 4:27 AM@Composable
Chachako
05/31/2021, 4:47 AMcomposed
Modifier should be used, this will allow you to call the LocalContext.current
in the ModifierNikhil
05/31/2021, 5:26 AM