美文网首页
flutter RotatedBox旋转盒子

flutter RotatedBox旋转盒子

作者: 喜剧收尾_XWX | 来源:发表于2020-08-15 22:20 被阅读0次
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),
              ),
            ),
          )),
    );
  }
}

相关文章

网友评论

      本文标题:flutter RotatedBox旋转盒子

      本文链接:https://www.haomeiwen.com/subject/gmiydktx.html