当前位置:网站首页>Get to know the drawing component of flutter - custompaint
Get to know the drawing component of flutter - custompaint
2022-06-25 04:45:00 【Ma Nong on the island】
brief introduction
In some scenes , We will need to draw some highly customized components , such as UI The designer gave us a problem —— Make a strange frame . witness UI The designer is for the sake of a beautiful little sister , I'm sorry to say this can't be done ( That's also very shameful ). At this time, we can't directly use Flutter The self-contained components , Instead, you need to draw the components manually , Then you need to use CuntomPaint Components .CustomPaint Components and front end Canvas almost , Allows us to draw various elements on a canvas , Including some 、 Line 、 rectangular 、 arc 、 written words 、 Pictures, etc. .
CustomPaint Introduce
CustomPaint It's a Widget, There are three important parameters :
CustomPaint(
child: childWidget(),
foregroundPainter: foregroundPainter(),
painter: backgroundPainter(),
)
child:CustomPaintThe child components ;painterandforegroundPainter: All areCustomPainterclass , Used for definitioncanvasThe content of the drawing . The difference lies in , The first is executionpainterThe drawing instructions of . Then render on the backgroundchildChild components . Last ,foregroundPainterThe contents of will be drawn
边栏推荐
- Method of opening data recovery of solid state disk
- CTF_ Web: advanced problem WP (5-8) of attack and defense world expert zone
- Immutable学习之路----告别传统拷贝
- My IC journey - the growth of senior chip design verification engineers - "Hu" said that IC engineers are perfect and advanced
- Cannot import name 'escape' from 'jinja2' [solved successfully]
- Gbase 8s stored procedure flow control
- leetcode1221. Split balance string
- LabVIEW development gas regulator
- GBASE 8s存储过程语法结构
- Mongodb cluster
猜你喜欢

Unity Quad culls shaders with back faces and transparent parts

Heavy broadcast | phase shift method + mathematical principle derivation of multi frequency heterodyne + implementation

执行SQL响应比较慢,你有哪些排查思路?

本轮压力测试下,DeFi协议们表现如何?

冰冰学习笔记:循环队列的实现

「 每日一练,快乐水题 」1108. IP 地址无效化

Kotlin Compose 完善toDo项目 Surface 渲染背景 与阴影

【图像融合】基于matlab方向离散余弦变换和主成分分析图像融合【含Matlab源码 1907期】

Gbase 8s overall architecture

"Daily practice, happy water" 1108 IP address invalidation
随机推荐
GBASE 8s的数据导入和导出
高效的NoSQL数据库服务Amozon DynamoDB体验分享
Basic introduction of gbase 8s blocking technology
PostgreSQL database Wal - RM_ HEAP_ ID logging action
Unity Quad culls shaders with back faces and transparent parts
Upgrade PHP to php7 The impact of X (2), the obsolescence of mcrypt decryption
GBASE 8s存储过程语法结构
CTF_ Web: Changan cup-2021 old but a little new & asuka
固態硬盤開盤數據恢複的方法
Kotlin Compose 完善toDo项目 Surface 渲染背景 与阴影
Which programming language is the most cumbersome to implement Hello world?
Package for gbase 8s
js的call()和apply()
小白一键重装官网下载使用方法
Immutable学习之路----告别传统拷贝
Web3 DApp用户体验最佳实践
dotnet-exec 0.4.0 released
Huawei Hongmeng development lesson 4
Structure syntaxique des procédures stockées gbase 8S
Join() in JSZ