MaskFilter.blur constructor

const MaskFilter.blur(BlurStyle _style, double _sigma)

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.

A blur is an expensive operation and should therefore be used sparingly.

The arguments must not be null.

See also:

Implementation

const MaskFilter.blur(
  this._style,
  this._sigma,
) : assert(_style != null),
    assert(_sigma != null);