Update docs
This commit is contained in:
parent
8c0cf1ddf7
commit
cb1b6502f1
@ -336,15 +336,14 @@ class ShaderMask extends SingleChildRenderObjectWidget {
|
|||||||
/// A widget that applies a filter to the existing painted content and then
|
/// A widget that applies a filter to the existing painted content and then
|
||||||
/// paints [child].
|
/// paints [child].
|
||||||
///
|
///
|
||||||
/// The filter will only be applied to the area of the background in which the
|
/// The filter will be applied to all the area within its parent or ancestor
|
||||||
/// [child] (or one of its descendants) is actually going to paint in regardless
|
/// widget's clip. If there's no clip, the filter will be applied to the full
|
||||||
/// of the actual size of [child].
|
/// screen.
|
||||||
///
|
///
|
||||||
/// {@tool sample}
|
/// {@tool sample}
|
||||||
/// Even though the [BackdropFilter] is wrapping the [Container] below, the
|
/// If the [BackdropFilter] needs to be applied to an area that exactly matches
|
||||||
/// background will only be blurred in the area defined by the bounding box
|
/// its child, wraps the [BackdropFilter] with a clip widget that clips exactly
|
||||||
/// of the [Text] because that's the only area any descendant of the
|
/// to that child.
|
||||||
/// [BackdropFilter] is painting in.
|
|
||||||
///
|
///
|
||||||
/// ```dart
|
/// ```dart
|
||||||
/// Stack(
|
/// Stack(
|
||||||
@ -352,6 +351,7 @@ class ShaderMask extends SingleChildRenderObjectWidget {
|
|||||||
/// children: <Widget>[
|
/// children: <Widget>[
|
||||||
/// Text('0' * 10000),
|
/// Text('0' * 10000),
|
||||||
/// Center(
|
/// Center(
|
||||||
|
/// child: ClipRect( // <-- clips to the 200x200 [Container] below
|
||||||
/// child: BackdropFilter(
|
/// child: BackdropFilter(
|
||||||
/// filter: ui.ImageFilter.blur(
|
/// filter: ui.ImageFilter.blur(
|
||||||
/// sigmaX: 5.0,
|
/// sigmaX: 5.0,
|
||||||
@ -365,34 +365,6 @@ class ShaderMask extends SingleChildRenderObjectWidget {
|
|||||||
/// ),
|
/// ),
|
||||||
/// ),
|
/// ),
|
||||||
/// ),
|
/// ),
|
||||||
/// ],
|
|
||||||
/// )
|
|
||||||
/// ```
|
|
||||||
///
|
|
||||||
/// To blur the entire area of the [Container], increase the paint area of
|
|
||||||
/// the Container. Giving it a transparent background color will increase
|
|
||||||
/// the paint area of the container (and hence blur the background behind the
|
|
||||||
/// entire container) without changing other visual properties.
|
|
||||||
///
|
|
||||||
/// ```dart
|
|
||||||
/// Stack(
|
|
||||||
/// fit: StackFit.expand,
|
|
||||||
/// children: <Widget>[
|
|
||||||
/// Text('0' * 10000),
|
|
||||||
/// Center(
|
|
||||||
/// child: BackdropFilter(
|
|
||||||
/// filter: ui.ImageFilter.blur(
|
|
||||||
/// sigmaX: 5.0,
|
|
||||||
/// sigmaY: 5.0,
|
|
||||||
/// ),
|
|
||||||
/// child: Container(
|
|
||||||
/// color: Colors.transparent, // <-- NEW
|
|
||||||
/// alignment: Alignment.center,
|
|
||||||
/// width: 200.0,
|
|
||||||
/// height: 200.0,
|
|
||||||
/// child: Text('Hello World'),
|
|
||||||
/// ),
|
|
||||||
/// ),
|
|
||||||
/// ),
|
/// ),
|
||||||
/// ],
|
/// ],
|
||||||
/// )
|
/// )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user