当前位置:网站首页>Flutter series: Transformers in flutter
Flutter series: Transformers in flutter
2022-06-27 23:59:00 【InfoQ】
brief introduction
Transform brief introduction
class Transform extends SingleChildRenderObjectWidget
const Transform({
Key? key,
required this.transform,
this.origin,
this.alignment,
this.transformHitTests = true,
this.filterQuality,
Widget? child,
}) : assert(transform != null),
super(key: key, child: child);
Transform.rotate({
Key? key,
required double angle,
this.origin,
this.alignment = Alignment.center,
this.transformHitTests = true,
this.filterQuality,
Widget? child,
}) : transform = Matrix4.rotationZ(angle),
super(key: key, child: child);
Transform.translate({
Key? key,
required Offset offset,
this.transformHitTests = true,
this.filterQuality,
Widget? child,
}) : transform = Matrix4.translationValues(offset.dx, offset.dy, 0.0),
origin = null,
alignment = null,
super(key: key, child: child);
Transform.scale({
Key? key,
required double scale,
this.origin,
this.alignment = Alignment.center,
this.transformHitTests = true,
this.filterQuality,
Widget? child,
}) : transform = Matrix4.diagonal3Values(scale, scale, 1.0),
super(key: key, child: child);
Transform Use
Widget build(BuildContext context) {
return Center(
child: Transform.rotate(
angle: pi/4,
child: const Icon(
Icons.airplanemode_active,
size: 200,
color: Colors.blue,
),
));
}

return Transform.translate(
offset:const Offset(50.0, 100.0),
child: const Icon(
Icons.airplanemode_active,
size: 200,
color: Colors.blue,
),
);

return Transform.scale(
scale: 0.5,
child: const Icon(
Icons.airplanemode_active,
size: 200,
color: Colors.blue,
),
);

summary
边栏推荐
- 股市小白在网上股票开户安全吗?
- Golang uses Mongo driver operation - query (Advanced)
- 【Try to Hack】veil-evasion免杀
- 使用cef3开发的浏览器不支持flash问题的解决
- 证券注册账户安全吗,会有风险吗?
- 100 questions for an enterprise architect interview
- N methods for obtaining effective length of genes
- 【Vim】使用教程,常用命令,高效使用Vim编辑器
- 【AI应用】NVIDIA GeForce RTX 1080Ti的详情参数
- Feign implements path escape through custom annotations
猜你喜欢

本地可视化工具连接阿里云centOS服务器的redis

How to quote Chinese documents when writing a foreign language?

发射,接收天线方向图
思源笔记订阅停止直接删云端数据嘛?

图的存储结构

Structure de stockage des graphiques

MySQL企业级参数调优实践分享

Zero foundation self-study SQL course | complete collection of SQL basic functions
![[sword finger offer] 47 Maximum value of gifts](/img/bc/1aff1223b1672c4089151dc56c4d4e.png)
[sword finger offer] 47 Maximum value of gifts

【PCL自学:PCLPlotter】PCLPlotter绘制数据分析图
随机推荐
解决新版chrome跨域问题:cookie丢失以及samesite属性问题「建议收藏」
Usage of vivado vio IP
安全省油环保 骆驼AGM启停电池魅力十足
MySQL character set
Elk in Windows Environment - logstash+mysql (4)
PAT乙级1013
const关键字及其作用(用法),C语言const详解
支持删除,更新任意结点的优先级队列
ICML 2022:ufrgs | optimistic linear support and subsequent features as the basis for optimal strategy transfer
Are the registered accounts of the top ten securities companies safe and risky?
[AI application] detailed parameters of NVIDIA Tesla v100-pcie-32gb
Zero foundation self-study SQL course | if function
[digital ic/fpga] detect the position of the last matching sequence
[sword finger offer] 48 Longest substring without duplicate characters
At the beginning of reading English literature, I would like to ask you how you should read it in the first place?
思源笔记订阅停止直接删云端数据嘛?
超纲练习题不超纲
C WinForm reads the resources picture
零基础自学SQL课程 | SQL基本函数大全
华泰证券在网上开户安全吗?