当前位置:网站首页>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
边栏推荐
- N methods for obtaining effective length of genes
- 单细胞数据清洗的这5个步骤你会做吗?
- How to find Chinese documents corresponding to foreign documents?
- Sécurité, économie de carburant et protection de l'environnement chameau
- Golang uses Mongo driver operation - query (Advanced)
- 搭建开源美观的数据库监控系统-Lepus
- VMware virtual machine bridging connectivity
- 发射,接收天线方向图
- 零基础自学SQL课程 | SQL中的日期函数大全
- virtualbox扩展动态磁盘大小的坑
猜你喜欢

Zero foundation self-study SQL course | complete collection of date functions in SQL

零基础自学SQL课程 | SQL基本函数大全
Does the subscription of Siyuan notes stop deleting cloud data directly?

C language character pointer and string initialization

MSP430F5529 单片机 读取 GY-906 红外温度传感器

webserver流程图——搞懂webserver各模块间调用关系

零基础自学SQL课程 | SQL中的日期函数大全

图的存储结构

【微服务|Sentinel】sentinel数据持久化

智慧风电 | 图扑软件数字孪生风机设备,3D 可视化智能运维
随机推荐
第 2 章 集成 MP
表单form 和 表单元素(input、select、textarea等)
十大券商注册账户安全吗,会有风险吗?
【tinyriscv verilator】分支移植到正点原子达芬奇开发板
Applet referer
刚开始看英文文献,想问一下各位,最初应该怎么看进去?
Swing UI container (I)
Google Earth engine (GEE) 03 vector data type
Is it safe to open a stock account through the account opening QR code of CICC securities manager? Or is it safe to open an account in a securities company?
const关键字及其作用(用法),C语言const详解
How to find Chinese documents corresponding to foreign documents?
Is it safe for Huatai Securities to open an account online?
单细胞数据清洗的这5个步骤你会做吗?
【Try to Hack】veil-evasion免杀
VirtualBox extended dynamic disk size pit
【Vim】使用教程,常用命令,高效使用Vim编辑器
通过中金证券经理的开户二维码开股票账户安全吗?还是去证券公司开户安全?
支持删除,更新任意结点的优先级队列
Teach you how to transplant tinyriscv to FPGA
2022年PMP项目管理考试敏捷知识点(3)