Skip to content

Instantly share code, notes, and snippets.

@ncuillery
Created April 21, 2020 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ncuillery/4ceb9957d5513898fa1f1177cca3714c to your computer and use it in GitHub Desktop.
Save ncuillery/4ceb9957d5513898fa1f1177cca3714c to your computer and use it in GitHub Desktop.
Center(
child: Padding(
padding: EdgeInsets.all(4),
child: Transform.rotate(
angle: pi / 4,
child: Text('Hello Flutter community'),
),
),
)
// equivalent to
Container(
alignment: Alignment(0, 0),
child: Container(
padding: EdgeInsets.all(4),
child: Container(
transform: Matrix4.rotationZ(pi / 4),
child: Text('Hello Flutter community'),
),
),
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment