File tree Expand file tree Collapse file tree 2 files changed +33
-4
lines changed
docs/widget/vision/transform
lib/widget/vision/transform Expand file tree Collapse file tree 2 files changed +33
-4
lines changed Original file line number Diff line number Diff line change 1- ## ** 文档完善中**
1+ ## ** Transform**
2+
3+ > 在绘制子元素前应用转换的组件
4+
5+ ### 构造方法
6+ ```
7+ Transform({
8+ Key key,
9+ @required Matrix4 transform,
10+ Offset origin,
11+ AlignmentGeometry alignment,
12+ bool transformHitTests: true,
13+ Widget child
14+ })
15+ ```
16+
17+ ### 属性介绍
18+ origin:坐标系的原点(相对于此渲染对象的左上角)应用矩阵的原点
19+ alignment:原点的对齐方式
20+ transform: 在绘制过程中改变子元素的矩阵
21+ transformHitTests:在测试时是否执行转换
22+
23+
24+ ### 实例
Original file line number Diff line number Diff line change @@ -15,10 +15,16 @@ class _IndexState extends State<Index> {
1515 Widget build (BuildContext context) {
1616 return Scaffold (
1717 appBar: AppBar (
18- title: Text ('SingleChildScrollView ' ),
18+ title: Text ('Transform ' ),
1919 ),
20- body: Center (
21- child: Text ('更新中' ),
20+ body: Transform (
21+ alignment: Alignment .center,
22+ transform: Matrix4 .skewY (0.1 ),
23+ child: Container (
24+ padding: const EdgeInsets .all (8.0 ),
25+ color: const Color (0xFFE8581C ),
26+ child: const Text ('Apartment for rent!' ),
27+ ),
2228 ),
2329 );
2430 }
You can’t perform that action at this time.
0 commit comments