Skip to content

Instantly share code, notes, and snippets.

@ryanlid
Created Feb 16, 2020
Embed
What would you like to do?
RotatedBox 旋转盒子
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