IntermediateGradient constructor Null safety

IntermediateGradient(
  1. PrimitiveGradient primitive,
  2. GradientPacket packet,
  3. {GradientCopyWith overrideCopyWith = spectrumCopyWith}
)

Considering the GradientPacket.gradient to output, packet of potential properties from both of two gradients, and the primitive of colors and stops formed from those same two gradients:

Provide a dynamic createShader method that considers all the above to create a dart:ui Shader that best represents a mix of these gradients.

Implementation

IntermediateGradient(
  this.primitive,
  this.packet, {
  GradientCopyWith overrideCopyWith = spectrumCopyWith,
})  : _copyWith = overrideCopyWith,
      super(colors: primitive.colors, stops: primitive.stops);