首页 > 建站教程 > APP开发,混合APP >  Flutter笔记8:RotatedBox旋转Widget正文

Flutter笔记8:RotatedBox旋转Widget

RotatedBox旋转Widget
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
        title: 'RotatedBox组件',
        home: Scaffold(
          appBar: AppBar(
            title: Text('RotatedBox组件'),
          ),
          body: Center(
            child: Column(
              children: [
                SizedBox(
                  height: 20,
                ),
                RotatedBox(
                  //旋转次数,每次旋转45°
                  quarterTurns: 0,
                  child: Text('ABCDEFG'))
              ],
            ),
          ),
        ));
  }
}