【发布时间】:2018-12-23 09:03:39
【问题描述】:
我想制作带有封面图片和个人资料图片的个人资料页面。我需要将个人资料照片堆叠在底部的封面照片上。请参考上图。
下面是我目前的代码
class AccountPageState extends State<AccountPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
height: 170.0,
width: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/erev/background.png"),
fit: BoxFit.cover,
),
boxShadow: [new BoxShadow(color: Colors.black, blurRadius: 8.0)],
color: Colors.green),
child: Column(
children: <Widget>[
Padding(
padding: const EdgeInsets.only(
top: 60.0, bottom: 18.0, right: 18.0, left: 18.0),
child: Row(
children: <Widget>[
Container(
height: 60.0,
width: 60.0,
decoration: BoxDecoration(
shape: BoxShape.circle,
image: DecorationImage(
image: new AssetImage("assets/images/erev/admin.jpeg"),
fit: BoxFit.cover
)
),
),
],
),
),
],
),
),
);
}
}
【问题讨论】:
-
您好 Emmanuel,请粘贴您目前拥有的相关代码,以便为您提供帮助并避免投票
-
感谢您的提醒。我现在已经添加了代码
-
@EmmanuelFache 当您提出问题时,请记住其他开发人员以及他们如何搜索问题。尽量让你的问题标题和描述更详细
标签: flutter flutter-layout avatar