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
ad9b30b3
Unverified
Commit
ad9b30b3
authored
Nov 04, 2020
by
Shi-Hao Hong
Committed by
GitHub
Nov 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Center the AnimatedPositioned code sample (#69644)
parent
2f611f14
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
21 deletions
+24
-21
implicit_animations.dart
packages/flutter/lib/src/widgets/implicit_animations.dart
+24
-21
No files found.
packages/flutter/lib/src/widgets/implicit_animations.dart
View file @
ad9b30b3
...
...
@@ -1058,7 +1058,7 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> {
/// it also requires more development overhead as you have to manually manage
/// the lifecycle of the underlying [AnimationController].
///
/// {@tool dartpad --template=stateful_widget_scaffold}
/// {@tool dartpad --template=stateful_widget_scaffold
_center
}
///
/// The following example transitions an AnimatedPositioned
/// between two states. It adjusts the `height`, `width`, and
...
...
@@ -1069,13 +1069,15 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> {
///
/// @override
/// Widget build(BuildContext context) {
/// return Stack(
/// return Container(
/// width: 200,
/// height: 350,
/// child: Stack(
/// children: [
/// AnimatedPositioned(
/// width: selected ? 200.0 : 50.0,
/// height: selected ? 50.0 : 200.0,
/// top: selected ? 50.0 : 150.0,
/// right: 150.0,
/// duration: Duration(seconds: 2),
/// curve: Curves.fastOutSlowIn,
/// child: GestureDetector(
...
...
@@ -1086,11 +1088,12 @@ class _AnimatedAlignState extends AnimatedWidgetBaseState<AnimatedAlign> {
/// },
/// child: Container(
/// color: Colors.blue,
///
child: Text('Tap me to start the animated transition'
),
///
child: Center(child: Text('Tap me')
),
/// ),
/// ),
/// ),
/// ],
/// ),
/// );
/// }
///```
...
...
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