renderGradient static method
Implementation
static renderGradient(gradients color){
switch (color){
case gradients.green:
return const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [Colour.green, Colour.lightGradientGreen],
);
case gradients.red:
return const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [Colour.linearRed1, Colour.linearRed2],
);
case gradients.purple:
return const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [Colour.linearPurple1, Colour.linearPurple2],
);
case gradients.blue:
// TODO: Handle this case.
break;
case gradients.all:
return const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [Colour.green, Colour.accentYellow,Colour.accentRed,Colour.accentBlue],
);
case gradients.yellow:
return const LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [Colors.yellowAccent, Colour.accentYellow],
);
}
}