
2.
// OverFlowBox组件,可以做一些卡片重叠的效果
class OverFlowBoxDemo extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
color: Colors.green,
height: 100,
width: 200,
padding: EdgeInsets.only(left: 16, right: 16, top:56),
// 溢出容器
child: OverflowBox(
// 对齐方式
alignment: Alignment.topCenter,
maxHeight: 100,
maxWidth: 180,
child: Container(
color: Colors.blue,
height: 100,
width: 180,
),
),
);
}
}
博客围绕Flutter的OverflowBox溢出容器展开,虽内容仅提及编号‘2’,但核心是该容器相关信息技术内容。
3287

被折叠的 条评论
为什么被折叠?



