I have a container that has a gradient background color with some text. I am showing the percentage at the end of the container. Depending upon the percentage, Green color should be applied from left to right. When the percentage hit 100%, The whole container will become green.
Now I want to know that how to achieve the text color becomes white where the container color changes to green and vice-versa.
Note : The text in the container and the percentage are from API.
I have attached image for reference below.
in your case i think you can use something like this :
for a complete guide try this documentation