当前位置:网站首页>Shutter restraint container assembly
Shutter restraint container assembly
2022-06-11 06:55:00 【xiangxiongfly915】
Flutter Constrain container components
ConstrainedBox
Limit the size of sub assemblies , You can set the maximum value 、 minimum value .

ConstrainedBox(
constraints: const BoxConstraints(
minWidth: 50,
minHeight: 50,
maxHeight: 100,
maxWidth: 100,
),
child: Container(
width: 10,
height: 10,
color: Colors.red,
),
),
const SizedBox(height: 10),
ConstrainedBox(
constraints: const BoxConstraints(
minWidth: 50,
minHeight: 50,
maxHeight: 100,
maxWidth: 100,
),
child: Container(
width: 200,
height: 200,
color: Colors.red,
),
)
SizedBox
Set a fixed width and height for the subassembly . Similar in function to ConstrainedBox Components .

SizedBox(
width: 50,
height: 50,
child: Container(color: Colors.green),
),
const SizedBox(height: 10),
SizedBox.fromSize(
size: const Size(50, 50),
child: Container(color: Colors.green),
)
UnconstrainedBox
Used to remove constraints from parent components , Allow subcomponents to be drawn to their own size .

The red text will only be displayed in the debug Display in mode , stay release Only the blue area will be displayed in mode .
SizedBox(
width: 10,
height: 10,
child: UnconstrainedBox(
child: Container(width: 100, height: 100, color: Colors.blue),
),
)
边栏推荐
- The meaning and research significance of mathematical methodology
- Dynamic import
- Count the time-consuming duration of an operation (function)
- 【概率论与数理统计】猴博士 笔记 p41-44 统计量相关小题、三大分布的判定、性质、总体服从正态分布的统计量小题
- client-go gin的简单整合六-list-watch二(关于Rs与Pod以及Deployment的完善)
- Flutter 约束容器组件
- Mediaextractor source code analysis of multimedia framework analysis (1)
- 【Matlab图像融合】粒子群优化自适应多光谱图像融合【含源码 004期】
- [matlab printed character recognition] OCR printed letter + number recognition [including source code 1861]
- 关于parseInt()
猜你喜欢

UEFI查找PCI设备

Sohu employees encounter wage subsidy fraud. What is the difference between black property and gray property and how to trace the source?

Whether the ZABBIX monitoring host is online

Flutter 约束容器组件

无心剑汉英双语诗001.《爱》

品牌定位个性六种形态及结论的重大意义

QT script document translation (I)

1266_FreeRTOS调度器启动代码实现分析

During unity panoramic roaming, AWSD is used to control lens movement, EQ is used to control lens lifting, and the right mouse button is used to control lens rotation.

Moment time plug-in tips -js (super detailed)
随机推荐
核查医药代表备案信息是否正确
Flat design, blog website (VIII) code source code
Practice: how to reasonably design functions to solve practical problems in software development (II) -- improving reusability
instanceof到底是怎样判断引用数据类型的!
fatal: refusing to merge unrelated histories
Pytest自动化测试-简易入门教程(01)
常用问题排查工具和分析神器,值得收藏
fatal: refusing to merge unrelated histories
Use of qscriptengine class
Summary of string processing skills III
Stack -- one of two common linear structures of linear structure
WPF 数据绑定(四)
Shell脚本之启动Nacos服务端
VTK-vtkPlane和vtkCutter使用
saltstack部署lnmp
【Matlab印刷字符识别】OCR印刷字母+数字识别【含源码 1861期】
During unity panoramic roaming, AWSD is used to control lens movement, EQ is used to control lens lifting, and the right mouse button is used to control lens rotation.
Starting from scratch (I)
Leetcode hot topic 100 topic 6-10 solution
河南高考VS天津高考(2008年-2021年)