createShader method Null safety

  1. @override
Shader createShader(
  1. Rect rect,
  2. {TextDirection? textDirection}
)
override

Falls back to LinearGradient if type is not hard-coded.

Consider overriding _copyWith by providing a custom GradientCopyWith during construction as overrideCopyWith.

Implementation

@override
Shader createShader(Rect rect, {TextDirection? textDirection}) =>
    resolved.createShader(rect, textDirection: textDirection);