How can I add my own custom colors to SliderColors...
# compose
z
How can I add my own custom colors to SliderColors? im not able to implement it, so im unsure what else to do
c
You can use
SliderDefaults.colors
and pass in the custom values for each individual color there. This is the pattern for most material widgets. For me example,
ButtonDefaults
,
TextFieldDefaults
etc. By the way, why are you not able to implement
SliderColors
? It is an interface so you should be able to implement it (although it is more work than SliderDefaults.colors)
z
Its a class with an internal constructor in the material3 library
c
Ah okay
c
cc @Gurupreet singh