How can I rotate a Container widget in 2D around a specified anchor point?

后端 未结 4 1996
余生分开走
余生分开走 2021-02-05 09:44

I\'d like to perform a very simple 2D rotation of a Container widget (that contains a handful of other widgets.) This widget would be rotated around a single fixed point in the

4条回答
  •  时光取名叫无心
    2021-02-05 09:49

    You can use RotatedBox Widget to rotate any widget:

    RotatedBox(
        quarterTurns: 3,
        child: Container(
            color:Colors.red
        ),
    ),
    

提交回复
热议问题