import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return MaterialApp(
title: "RotatedBox旋转盒子",
home: Scaffold(
appBar: AppBar(
title: Text('RotatedBox旋转盒子'),
),
body: Center(
child: RotatedBox(
quarterTurns: 2, //旋转次数,一次为90
child: Text(
'RotatedBox旋转盒子',
style: TextStyle(fontWeight: FontWeight.w400, fontSize: 28.0),
),
),
)),
);
}
}
网友评论