filter property
Implementation
@override
List<CSSFunctionalNotation>? get filter => _filter;
set
filter
(List<CSSFunctionalNotation> ? functions)
Implementation
set filter(List<CSSFunctionalNotation>? functions) {
_filter = functions;
// Clear cache when filter changed.
_cachedColorFilter = null;
_cachedImageFilter = null;
// Filter effect the stacking context.
RenderBoxModel? parentRenderer = parent?.renderBoxModel;
if (parentRenderer is RenderLayoutBox) {
parentRenderer.markChildrenNeedsSort();
}
renderBoxModel?.markNeedsPaint();
if (!kReleaseMode && functions != null) {
ColorFilter? colorFilter = _parseColorFilters(functions);
// RenderStyle renderStyle = this;
ImageFilter? imageFilter = _parseImageFilters(functions);
if (imageFilter == null && colorFilter == null) {
print('[WARNING] Parse CSS Filter failed or not supported: "$functions"');
String supportedFilters = '$GRAYSCALE $SEPIA $BLUR';
print('Kraken only support following filters: $supportedFilters');
}
}
}