Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
cb1b6502
Commit
cb1b6502
authored
Mar 08, 2019
by
Yuqian Li
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs
parent
8c0cf1dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
46 deletions
+18
-46
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+18
-46
No files found.
packages/flutter/lib/src/widgets/basic.dart
View file @
cb1b6502
...
...
@@ -336,15 +336,14 @@ class ShaderMask extends SingleChildRenderObjectWidget {
/// A widget that applies a filter to the existing painted content and then
/// paints [child].
///
/// The filter will
only be applied to the area of the background in which the
///
[child] (or one of its descendants) is actually going to paint in regardless
///
of the actual size of [child]
.
/// The filter will
be applied to all the area within its parent or ancestor
///
widget's clip. If there's no clip, the filter will be applied to the full
///
screen
.
///
/// {@tool sample}
/// Even though the [BackdropFilter] is wrapping the [Container] below, the
/// background will only be blurred in the area defined by the bounding box
/// of the [Text] because that's the only area any descendant of the
/// [BackdropFilter] is painting in.
/// If the [BackdropFilter] needs to be applied to an area that exactly matches
/// its child, wraps the [BackdropFilter] with a clip widget that clips exactly
/// to that child.
///
/// ```dart
/// Stack(
...
...
@@ -352,45 +351,18 @@ class ShaderMask extends SingleChildRenderObjectWidget {
/// children: <Widget>[
/// Text('0' * 10000),
/// Center(
/// child: BackdropFilter(
/// filter: ui.ImageFilter.blur(
/// sigmaX: 5.0,
/// sigmaY: 5.0,
/// ),
/// child: Container(
/// alignment: Alignment.center,
/// width: 200.0,
/// height: 200.0,
/// child: Text('Hello World'),
/// ),
/// ),
/// ),
/// ],
/// )
/// ```
///
/// 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'),
/// child: ClipRect( // <-- clips to the 200x200 [Container] below
/// child: BackdropFilter(
/// filter: ui.ImageFilter.blur(
/// sigmaX: 5.0,
/// sigmaY: 5.0,
/// ),
/// child: Container(
/// alignment: Alignment.center,
/// width: 200.0,
/// height: 200.0,
/// child: Text('Hello World'),
/// ),
/// ),
/// ),
/// ),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment