NillGradients extension Null safety

A wrapper for retrieving transparent, empty Gradients appropriate for smooth GradientTweens.

Though all are transparent, consider that some have other properties set as well; such as the start and end angle for sweep both being ~0 or the radius of radial being 0.

The getter asNill is an extended property for an instantiated Gradient. It refers to the static method nillify, which may be called as:

NillGradients.nillify(Type type)
on

Properties

asNill Gradient
Gradient get asNill => nillify( /* this. */ runtimeType); [...]
read-only

Static Properties

linear LinearGradient
An empty, transparent LinearGradient.
read-only
radial RadialGradient
An empty, transparent RadialGradient.
read-only
stepsLinear LinearSteps
An empty, transparent LinearSteps.
read-only
stepsRadial RadialSteps
An empty, transparent RadialSteps.
read-only
stepsSweep SweepSteps
An empty, transparent SweepSteps.
read-only
sweep SweepGradient
An empty, transparent SweepGradient.
read-only

Static Methods

nillify(Type type) Gradient?
Returns an empty, transparent Gradient of type matching type if one is available. Otherwise returns null such that asNill might generate a "nill" gradient by Gradient.copyWith(), which itself falls back to RadialGradient if type cannot be matched. [...]