How to create a Diagonal LinearGradient?

#1

I wanted the expo LinearGradient apply diagonally. My code is…

<LinearGradient
colors={[’#ffff33’, ‘#ff471a’]}
start={{x: 0, y: 1}}
end={{x: 1, y: 0}}
style={styles.kitchenSpecGrad}

but its show the gradient horizontally. Can anybody help.
Thanks in advance.

#2

Hi there, the start and end properties are arrays, rather than {x,y} objects. So this might work:

start={[0,1]}
end={[1,0]}