'switch color (from light to dark gradient and vice versa) inside Linear Gradient React Native

I am implementing an UI using Linear Gradient with light gradient background. I want to make a switch via which i can change the color of Linear Gradient to dark gradient. any way to do it. I am new in React Native. Hope i will get my answer soon. Thanks in advance.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source