当前位置:网站首页>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),
),
)
边栏推荐
- Leetcode hot topic 100 topic 21-25 solution
- LEARNING TARGET-ORIENTED DUAL ATTENTION FOR ROBUST RGB-T TRACKING
- 必读1:格局越大的人,越懂得说话
- Heartless sword Chinese English bilingual poem 001 Love
- The meaning and research significance of mathematical methodology
- 235-二叉搜索树的最近公共祖先
- []==![]
- Luogu p1091 chorus formation (longest ascending subsequence)
- Text overflow failure
- 洛谷P1091合唱队形(最长上升子序列)
猜你喜欢

JVM from getting started to abandoning 1: memory model

【Matlab WSN通信】A_Star改进LEACH多跳传输协议【含源码 487期】

Latex various arrows / arrows with text labels / variable length arrows

Leetcode hot topic 100 topic 11-15 solution

.NET C#基础(6):命名空间 - 有名字的作用域

网狐游戏服务器房间配置约战定制功能实现

byte和bit的区别

Moment time plug-in tips -js (super detailed)
![Handwritten promise [05] - exception capture of promise method and optional parameters of then method implementation](/img/e7/87069f921ae003511e32b23653703c.jpg)
Handwritten promise [05] - exception capture of promise method and optional parameters of then method implementation

saltstack部署lnmp
随机推荐
Scripy web crawler series tutorials (I) | construction of scripy crawler framework development environment
Array information management system reconfiguration preheating (1) how to write basic logic using linear continuous structure?
Practice: how to reasonably design functions to solve practical problems in software development (II) -- improving reusability
Sohu employees encounter wage subsidy fraud. What is the difference between black property and gray property and how to trace the source?
A highly controversial issue
WPF 数据绑定(四)
【Matlab图像融合】粒子群优化自适应多光谱图像融合【含源码 004期】
Won't virtual DOM be available in 2022? Introduction to virtual Dom and complete implementation of diff and patch
Illustrate the principle of one-way linked list and the method of JS to realize linked list [with source code]
How exactly does instanceof judge the reference data type!
迅为干货 |瑞芯微RK3568开发板TFTP&NFS烧写(上)
[matlab WSN communication] a_ Star improved leach multi hop transmission protocol [including source code phase 487]
数学方法论的含义和研究意义
The realization of online Fox game server room configuration battle engagement customization function
无心剑汉英双语诗001.《爱》
100. same tree
Mongodb installation
Difference between byte and bit
572. subtree of another tree
617. merge binary tree