gradientBackground method
Adds a gradient background to the widget.
Implementation
Widget gradientBackground(List<Color> colors, {Alignment begin = Alignment.topLeft, Alignment end = Alignment.bottomRight}) {
return Container(
decoration: BoxDecoration(
gradient: LinearGradient(
colors: colors,
begin: begin,
end: end,
),
),
child: this,
);
}