import 'package:flutter/material.dart';
import 'package:flutter_jdshop/services/ScreenAdapter.dart'; class UserPage extends StatefulWidget {
UserPage({Key key}) : super(key: key); _UserPageState createState() => _UserPageState();
} class _UserPageState extends State<UserPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("用户中心"),
),
body: ListView(
children: <Widget>[
Container(
height: ScreenAdapter.height(),
width: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('images/user_bg.jpg'),
fit: BoxFit.cover)),
child: Row(
children: <Widget>[
Container(
margin: EdgeInsets.fromLTRB(, , , ),
child: ClipOval(
child: Image.asset(
'images/user.png',
fit: BoxFit.cover,
width: ScreenAdapter.width(),
height: ScreenAdapter.width(),
),
),
),
// Expanded(
// flex: 1,
// child: Text('登录/注册',style: TextStyle(
// color: Colors.white
// )),
// )
Expanded(
flex: ,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
Text("用户名:123456789",
style: TextStyle(
color: Colors.white,
fontSize: ScreenAdapter.size())),
Text("普通会员",
style: TextStyle(
color: Colors.white,
fontSize: ScreenAdapter.size()))
],
),
)
],
),
),
ListTile(
leading: Icon(Icons.home, color: Colors.red), title: Text('首页')),
Divider(),
ListTile(leading: Icon(Icons.home), title: Text('首页')),
ListTile(leading: Icon(Icons.home), title: Text('首页')),
ListTile(leading: Icon(Icons.home), title: Text('首页'))
],
),
);
}
}

pubspec.yaml

  assets:
- images/user_bg.jpg
- images/.0x/user_bg.jpg
- images/.0x/user_bg.jpg
- images/user.png
- images/.0x/user.png
- images/.0x/user.png

最新文章

  1. Segment set
  2. Python Set Literals
  3. 数学 - Whu 1603 - Minimum Sum
  4. mysql数据库的主从
  5. iOS字符串大小转换
  6. python学习之random模块
  7. 当 tcpdump -w 遇到 Permission denied
  8. C语言(按键获取与函数)
  9. winform控件跨线程委托
  10. Python虚拟环境安装virtualenv
  11. Android Studio的使用(六)
  12. Linux查看文件夹大小du
  13. Bootstrap每天必学之导航条
  14. 可视化之Berkeley Earth
  15. Fedora 19: How to resize/extend (LVM) partition?
  16. Python基础面试,看这篇文章画重点吧,Python面试题No1
  17. PyTorch(一)Basics
  18. extjs store快速创建的几种方式
  19. Kotlin provideDelegate
  20. 动态规划 51nod 1183

热门文章

  1. 交付Dubbo微服务到kubernetes集群
  2. Codeforces #366 (Div. 2) D. Ant Man (贪心)
  3. postgresql —— 查看索引
  4. tomcat启动之后,Chrome浏览器可以访问,IE不行(IE无法访问8080 端口)
  5. go语言-数据类型及类型之间转换
  6. linux mint 19.1安装搜狗输入法
  7. SQL:分区拾忆
  8. Lavavel Lifecycle
  9. exam9.6&amp;&amp;7
  10. Angular2日期格式化