Unverified Commit 5b76b350 authored by Filip Hracek's avatar Filip Hracek Committed by GitHub

Improve docs of ImageFiltered and BackdropFilter (#65503)

parent 039f1cf8
...@@ -384,8 +384,14 @@ class ShaderMask extends SingleChildRenderObjectWidget { ...@@ -384,8 +384,14 @@ class ShaderMask extends SingleChildRenderObjectWidget {
/// This effect is relatively expensive, especially if the filter is non-local, /// This effect is relatively expensive, especially if the filter is non-local,
/// such as a blur. /// such as a blur.
/// ///
/// If all you want to do is apply an [ImageFilter] to a single widget
/// (as opposed to applying the filter to everything _beneath_ a widget), use
/// [ImageFiltered] instead. For that scenario, [ImageFiltered] is both
/// easier to use and less expensive than [BackdropFilter].
///
/// See also: /// See also:
/// ///
/// * [ImageFiltered], which applies an [ImageFilter] to its child.
/// * [DecoratedBox], which draws a background under (or over) a widget. /// * [DecoratedBox], which draws a background under (or over) a widget.
/// * [Opacity], which changes the opacity of the widget itself. /// * [Opacity], which changes the opacity of the widget itself.
class BackdropFilter extends SingleChildRenderObjectWidget { class BackdropFilter extends SingleChildRenderObjectWidget {
......
...@@ -12,6 +12,12 @@ import 'package:flutter/rendering.dart'; ...@@ -12,6 +12,12 @@ import 'package:flutter/rendering.dart';
import 'framework.dart'; import 'framework.dart';
/// Applies an [ImageFilter] to its child. /// Applies an [ImageFilter] to its child.
///
/// See also:
///
/// * [BackdropFilter], which applies an [ImageFilter] to everything
/// beneath its child.
/// * [ColorFiltered], which applies a [ColorFilter] to its child.
@immutable @immutable
class ImageFiltered extends SingleChildRenderObjectWidget { class ImageFiltered extends SingleChildRenderObjectWidget {
/// Creates a widget that applies an [ImageFilter] to its child. /// Creates a widget that applies an [ImageFilter] to its child.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment