linearGradientColor method

Container linearGradientColor(
  1. List<Color> colors
)

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)));
}