flutter RotatedBox旋转盒子

2020-08-15  本文已影响0人  喜剧收尾_XWX
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),
              ),
            ),
          )),
    );
  }
}
上一篇 下一篇

猜你喜欢

热点阅读