Skip to content

Instantly share code, notes, and snippets.

@ryanlid
Created February 16, 2020 15:20
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 ryanlid/5ab2152fff6ddbbd61e32420490be4e6 to your computer and use it in GitHub Desktop.
Save ryanlid/5ab2152fff6ddbbd61e32420490be4e6 to your computer and use it in GitHub Desktop.
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