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;
_filterDropShadows = functions != null ? _parseDropShadowFilters(functions) : null;
resetBoxDecoration();
// Filter effect the stacking context.
RenderStyle? parentRenderStyle = getParentRenderStyle();
parentRenderStyle?.markChildrenNeedsSort();
markNeedsPaint();
if (!kReleaseMode && functions != null) {
ColorFilter? colorFilter = _parseColorFilters(functions);
// RenderStyle renderStyle = this;
ImageFilter? imageFilter = _parseImageFilters(functions);
final bool hasDropShadow = _filterDropShadows != null && _filterDropShadows!.isNotEmpty;
if (imageFilter == null && colorFilter == null && !hasDropShadow) {
print('[WARNING] Parse CSS Filter failed or not supported: "$functions"');
String supportedFilters =
'$GRAYSCALE $SEPIA $BRIGHTNESS $CONTRAST $HUE_ROTATE $INVERT $SATURATE $DROP_SHADOW $BLUR';
print('WebF only support following filters: $supportedFilters');
}
}
}