AdLinearGradient constructor

AdLinearGradient(
  1. {AdGradientOrientation? orientation,
  2. required List<Color> colors}
)

Creates a LinearGradient.

Uses GradientDrawable on Android

  • You must specify at least two colors.
  • The default orientation is left_right (left to right)

Implementation

AdLinearGradient({
  AdGradientOrientation? orientation,
  required List<Color> colors,
}) : super(
        type: AdGradient.LINEAR,
        colors: colors,
        orientation: orientation,
      );