createShader static method

Shader createShader(
  1. double x,
  2. double y,
  3. List<Color>? colors, {
  4. double? angle,
})

Implementation

static Shader createShader(
  double x,
  double y,
  List<Color>? colors, {
  double? angle,
}) {
  return LinearGradient(
    tileMode: TileMode.clamp,
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
    // transform: GradientRotation(angle ?? 10 / 10),
    colors: colors ??
        [
          const Color(0xff2BCEFF).withOpacity(0.3),
          const Color(0xff0976E3).withOpacity(0.3),
        ],
  ).createShader(
    Rect.fromCircle(center: Offset(x, y), radius: 50.0),
  );
}