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
d57512ce
Unverified
Commit
d57512ce
authored
Jan 20, 2021
by
Muskan Jain
Committed by
GitHub
Jan 20, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AdoptAWidget: ColorFiltered (#71093)
parent
851ff687
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
color_filter.dart
packages/flutter/lib/src/widgets/color_filter.dart
+45
-0
No files found.
packages/flutter/lib/src/widgets/color_filter.dart
View file @
d57512ce
...
...
@@ -9,7 +9,52 @@ import 'framework.dart';
/// Applies a [ColorFilter] to its child.
///
/// This widget applies a function independently to each pixel of [child]'s
/// content, according to the [ColorFilter] specified.
/// Use the [ColorFilter.mode] constructor to apply a [Color] using a [BlendMode].
/// Use the [BackdropFilter] widget instead, if the [ColorFilter]
/// needs to be applied onto the content beneath [child].
///
/// {@youtube 560 315 https://www.youtube.com/watch?v=F7Cll22Dno8}
///
/// {@tool dartpad --template=stateless_widget_scaffold}
///
/// These two images have two [ColorFilter]s applied with different [BlendMode]s,
/// one with red color and [BlendMode.modulate] another with a grey color and [BlendMode.saturation].
///
/// ```dart
/// Widget build(BuildContext context) {
/// return SingleChildScrollView(
/// child: Column(
/// children: [
/// ColorFiltered(
/// colorFilter: ColorFilter.mode(
/// Colors.red,
/// BlendMode.modulate,
/// ),
/// child: Image.network(
/// 'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl-2.jpg'),
/// ),
/// ColorFiltered(
/// colorFilter: ColorFilter.mode(
/// Colors.grey,
/// BlendMode.saturation,
/// ),
/// child: Image.network(
/// 'https://flutter.github.io/assets-for-api-docs/assets/widgets/owl.jpg'),
/// ),
/// ],
/// ),
/// );
/// }
/// ```
///{@end-tool}
///
/// See Also:
///
/// * [BlendMode], describes how to blend a source image with the destination image.
/// * [ColorFilter], which describes a function that modify a color to a different color.
@immutable
class
ColorFiltered
extends
SingleChildRenderObjectWidget
{
/// Creates a widget that applies a [ColorFilter] to its child.
...
...
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