gradient method

Gradient gradient()

Implementation

Gradient gradient() {
  switch (gradientType) {
    case BadgeGradientType.linear:
      return LinearGradient(
        colors: colors,
        begin: begin!,
        end: end!,
        stops: stops,
        tileMode: tileMode,
        transform: transform,
      );
    case BadgeGradientType.radial:
      return RadialGradient(
        colors: colors,
        radius: radius!,
        center: center!,
        stops: stops,
        tileMode: tileMode,
        focal: focal,
        focalRadius: focalRadius!,
        transform: transform,
      );
    case BadgeGradientType.sweep:
      return SweepGradient(
        colors: colors,
        center: center!,
        startAngle: startAngle!,
        endAngle: endAngle!,
        stops: stops,
        tileMode: tileMode,
        transform: transform,
      );
  }
}