Cop*_*oad 88
之前:
之后:
import 'dart:math' as math; // import this
Transform(
alignment: Alignment.center,
transform: Matrix4.rotationY(math.pi),
child: Icon(Icons.rotate_left, size: 100,),
)
Run Code Online (Sandbox Code Playgroud)
Kwa*_*edu 76
接受的答案有效,但要添加我的两分钱,您可以使用以下内容:
Transform.scale(
scaleX: -1,
child: Icon(
Icons.rotate_left,
size: 100,
),
)
Run Code Online (Sandbox Code Playgroud)
效果相同,但没有import声明或任何显式矩阵规范
Dee*_*hah 24
使用 Flutter 3.10.2(不确定之前是否可用),可以如下翻转:
Transform.flip(
flipX: true,
child: const Icon(Icons.rotate_right),
)
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
14137 次 |
| 最近记录: |