当前位置:网站首页>Shutter fittedbox component
Shutter fittedbox component
2022-06-25 04:15:00 【xiangxiongfly915】
List of articles
Flutter FittedBox Components
sketch
When the aspect ratio of the child component is different from that of the parent component , Sure FittedBox Component operations child components stretch or fill the space of the parent component .
Basic attributes
fit: How child elements are filled .
- fill: Populate parent component .
- contain: Isometric stretching .
- cover: The proportional stretch fills the parent component , As small as possible .
- fitWidth: Isometric stretching , The width fills the parent component .
- fitHeight: Isometric stretching , Highly filled with parent components .
- none: The default subcomponent is centered , Don't deal with it .
- scaleDown: Zoom to contain, Otherwise none equally .
Use



const Text(" Original picture "),
Container(
width: 100,
height: 100,
color: Colors.red,
child: const Image(image: AssetImage("images/bird.jpg")),
),
const Text("BoxFit.fill"),
Container(
width: 100,
height: 100,
color: Colors.red,
child: const FittedBox(
fit: BoxFit.fill,
child: Image(image: AssetImage("images/bird.jpg")),
),
),
const SizedBox(height: 20),
const Text("BoxFit.contain"),
Container(
width: 100,
height: 100,
color: Colors.red,
child: const FittedBox(
fit: BoxFit.contain,
child: Image(image: AssetImage("images/bird.jpg")),
),
),
const SizedBox(height: 20),
const Text("BoxFit.cover"),
Container(
width: 100,
height: 100,
color: Colors.red,
child: const FittedBox(
fit: BoxFit.cover,
child: Image(image: AssetImage("images/bird.jpg")),
),
),
const SizedBox(height: 20),
const Text("BoxFit.fitWidth"),
Container(
width: 100,
height: 100,
color: Colors.red,
child: const FittedBox(
fit: BoxFit.fitWidth,
child: Image(image: AssetImage("images/bird.jpg")),
),
),
const SizedBox(height: 20),
const Text("BoxFit.fitHeight"),
Container(
width: 100,
height: 100,
color: Colors.red,
child: const FittedBox(
fit: BoxFit.fitHeight,
child: Image(image: AssetImage("images/bird.jpg")),
),
),
const SizedBox(height: 20),
// const Text("BoxFit.none"),
// Container(
// width: 100,
// height: 100,
// color: Colors.red,
// child: const FittedBox(
// fit: BoxFit.none,
// child: Image(image: AssetImage("images/bird.jpg")),
// ),
// ),
const SizedBox(height: 20),
const Text("BoxFit.scaleDown"),
Container(
width: 100,
height: 100,
color: Colors.red,
child: const FittedBox(
fit: BoxFit.scaleDown,
child: Image(image: AssetImage("images/bird.jpg")),
),
)
边栏推荐
- Is opencv open source?
- Mysql的order by
- numpy np tips:使用opencv对数组插值放缩到固定形状 cv2.resize(res, dsize=(64, 64), interpolation=cv2.INTER_CUBIC)
- 微信小程序中的列表渲染
- Work assessment of Biopharmaceutics of Jilin University in March of the 22nd spring -00005
- AI quantitative transaction (II) -- tushare financial data framework
- 学习码 滚动码 固定码 有什么区别重码数,编码容量滚动码的原理
- [proteus simulation] Arduino uno key controls the flashing increase / decrease display of nixie tube
- SEO的5大关键指标:排名+流量+会话+停留时长+跳出率
- 1、项目第二阶段——用户注册和登陆
猜你喜欢

Simple integration of client go gin -update

文本关键词提取:ansj

Flutter FittedBox组件

Lecture record: history and development of strapdown inertial navigation solution

Cesium drag 3D model

AI quantitative transaction (II) -- tushare financial data framework

Crawler crawls Sina Weibo data

Russian Airi Research Institute, etc. | SEMA: prediction of antigen B cell conformation characterization using deep transfer learning

opencv是开源的吗?

Vigilance against over range collection of privacy - ten mobile app violations
随机推荐
Serious PHP defects can lead to rce attacks on QNAP NAS devices
Zoran community
【LeetCode】22. bracket-generating
client-go gin的简单整合十-Update
Openmmlab environment configuration
如何绘制产业招商地图
Work assessment of Biopharmaceutics of Jilin University in March of the 22nd spring -00005
Jilin University 22 spring March document retrieval assignment assessment-00073
2022-06-21-flink-49 (I. SQL manual)
Windows 2003 64 bit system PHP running error: 1% is not a valid Win32 Application
AI quantitative transaction (II) -- tushare financial data framework
代錶多樣性的彩色 NFT 系列上線 The Sandbox 市場平臺
Cesium 加载显示热力图
The art of writing simple code
Hello CTP (II) -- Introduction to CTP
Cesium 拖拽3D模型
opencv 红色区域在哪里?
Lecture record: history and development of strapdown inertial navigation solution
2.吹响半音阶口琴
opencv最大能打开多少图像?