MaskFilter.blur(BlurStyle style, double sigma, { bool ignoreTransform: false, bool highQuality: false })

Creates a mask filter that takes the shape being drawn and blurs it.

This is commonly used to approximate shadows.

The style argument controls the kind of effect to draw; see BlurStyle.

The sigma argument controls the size of the effect. It is the standard deviation of the Gaussian blur to apply. The value must be greater than zero. The sigma corresponds to very roughly half the radius of the effect in pixels.

If the ignoreTransform argument is set, then the current transform is ignored when computing the blur. This makes the operation cheaper, but lowers the quality of the effect. In particular, it means that the sigma will be relative to the device pixel coordinate space, rather than the logical pixel coordinate space, which means the blur will look different on different devices.

If the highQuality argument is set, then the quality of the blur may be slightly improved, at the cost of making the operation even more expensive.

Even in the best conditions and with the lowest quality settings, a blur is an expensive operation and blurs should therefore be used sparingly.

Source

MaskFilter.blur(BlurStyle style, double sigma, {
  bool ignoreTransform: false,
  bool highQuality: false
}) {
  _constructor(style.index, sigma, _makeBlurFlags(ignoreTransform, highQuality));
}