Replace usage of FractionalOffset with Alignment (#12348)

Alignment will eventually replace FractionalOffset.
This commit is contained in:
Adam Barth
2017-10-02 00:06:24 -07:00
committed by GitHub
parent 2b126bcd0d
commit 0044ea2dbb
28 changed files with 62 additions and 62 deletions

View File

@@ -13,7 +13,7 @@ void main() {
// The root of our render tree is a RenderPositionedBox, which centers its
// child both vertically and horizontally.
root: new RenderPositionedBox(
alignment: FractionalOffset.center,
alignment: Alignment.center,
// We use a RenderParagraph to display the text 'Hello, world.' without
// any explicit styling.
child: new RenderParagraph(

View File

@@ -34,12 +34,12 @@ void main() {
// spin.
final RenderTransform spin = new RenderTransform(
transform: new Matrix4.identity(),
alignment: FractionalOffset.center,
alignment: Alignment.center,
child: square
);
// Finally, we center the spinning green square...
final RenderBox root = new RenderPositionedBox(
alignment: FractionalOffset.center,
alignment: Alignment.center,
child: spin
);
// and attach it to the window.