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
a39a8934
Unverified
Commit
a39a8934
authored
Sep 12, 2020
by
sehee Jeong
Committed by
GitHub
Sep 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sample code to FadeTransition (#64240)
parent
2e643651
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
1 deletion
+43
-1
transitions.dart
packages/flutter/lib/src/widgets/transitions.dart
+43
-1
No files found.
packages/flutter/lib/src/widgets/transitions.dart
View file @
a39a8934
...
@@ -660,7 +660,49 @@ class SizeTransition extends AnimatedWidget {
...
@@ -660,7 +660,49 @@ class SizeTransition extends AnimatedWidget {
/// Here's an illustration of the [FadeTransition] widget, with it's [opacity]
/// Here's an illustration of the [FadeTransition] widget, with it's [opacity]
/// animated by a [CurvedAnimation] set to [Curves.fastOutSlowIn]:
/// animated by a [CurvedAnimation] set to [Curves.fastOutSlowIn]:
///
///
/// {@animation 300 378 https://flutter.github.io/assets-for-api-docs/assets/widgets/fade_transition.mp4}
/// {@tool dartpad --template=stateful_widget_material_ticker}
///
/// The following code implements the [FadeTransition] using
/// the Flutter logo:
///
/// ```dart
/// AnimationController _controller;
/// Animation<double> _animation;
///
/// @override
/// void initState() {
/// super.initState();
/// _controller = AnimationController(
/// duration: const Duration(seconds: 2),
/// vsync: this,
/// )..repeat(reverse: true);
/// _animation = CurvedAnimation(
/// parent: _controller,
/// curve: Curves.easeIn,
/// );
/// }
///
/// @override
/// void dispose() {
/// _controller.dispose();
/// super.dispose();
/// }
///
/// @override
/// Widget build(BuildContext context) {
/// return Container(
/// color: Colors.white,
/// child: FadeTransition(
/// opacity: _animation,
/// child: const Padding(
/// padding: EdgeInsets.all(8),
/// child: FlutterLogo()
/// ),
/// ),
/// );
/// }
/// ```
/// {@end-tool}
///
///
/// See also:
/// See also:
///
///
...
...
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