linearGradientColor method
Implementation
Container linearGradientColor(List<Color> colors) {
var newStyle = ButtonStyle(
backgroundColor: MaterialStateProperty.all(Colors.transparent),
shadowColor: MaterialStateProperty.all(Colors.transparent),
);
var merge = style?.merge(newStyle) ?? newStyle;
var button = copyWith(style: merge);
return Container(child: button, decoration: BoxDecoration(gradient: LinearGradient(colors: colors)));
}