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
68aad286
Commit
68aad286
authored
Mar 15, 2016
by
Collin Jackson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change SizeTransition API to take a double instead of FractionalOffset for alignment
parent
ea19aca9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
transitions.dart
packages/flutter/lib/src/widgets/transitions.dart
+8
-3
No files found.
packages/flutter/lib/src/widgets/transitions.dart
View file @
68aad286
...
...
@@ -186,7 +186,7 @@ class SizeTransition extends AnimatedWidget {
Key
key
,
this
.
axis
:
Axis
.
vertical
,
Animation
<
double
>
sizeFactor
,
this
.
a
lignment
:
const
FractionalOffset
(
0.5
,
0.5
)
,
this
.
a
xisAlignment
:
0.5
,
this
.
child
})
:
sizeFactor
=
sizeFactor
,
super
(
key:
key
,
animation:
sizeFactor
)
{
assert
(
axis
!=
null
);
...
...
@@ -200,13 +200,18 @@ class SizeTransition extends AnimatedWidget {
/// width or height multiplied by v.
final
Animation
<
double
>
sizeFactor
;
/// How to align the child
. See the [Align] widget
.
final
FractionalOffset
a
lignment
;
/// How to align the child
along the axis that sizeFactor is modifying
.
final
double
axisA
lignment
;
final
Widget
child
;
@override
Widget
build
(
BuildContext
context
)
{
FractionalOffset
alignment
;
if
(
axis
==
Axis
.
vertical
)
alignment
=
new
FractionalOffset
(
0.0
,
axisAlignment
);
else
alignment
=
new
FractionalOffset
(
axisAlignment
,
0.0
);
return
new
ClipRect
(
child:
new
Align
(
alignment:
alignment
,
...
...
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