RotatedBox 旋转盒子
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() { | |
runApp( | |
MyApp(), | |
); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: "RotatedBox旋转盒子示例", | |
home: Scaffold( | |
appBar: AppBar( | |
title: Text( | |
"RotatedBox旋转盒子示例", | |
style: TextStyle( | |
color: Colors.white, | |
), | |
), | |
), | |
body: Center( | |
child: RotatedBox( | |
// 旋转次数,一次90度 | |
quarterTurns: 3, | |
child: Text( | |
"RotatedBox旋转盒子示例", | |
style: TextStyle(fontSize: 28.0), | |
), | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment