buildFilter method
Builds the mask filter and image filter for the blur effect.
This method is called when the filter is marked as dirty and needs to be updated.
Implementation
@override
void buildFilter() {
var maxBlur = maskSigma;
if (maxBlur == -1) {
maxBlur = Math.max(_blurX, _blurY) / 2;
if (maxBlur < 1) maxBlur = 1;
}
/// if it goes under a threshold (I tried .2 and lower), it flickers.
/// idk which logic uses, but 1.0 seems like a stable min number for the
/// mask.
_maskFilter = ui.MaskFilter.blur(style, maxBlur);
_imageFilter = ui.ImageFilter.blur(sigmaX: _blurX, sigmaY: _blurY);
}