chatting/lib/personal_page.dart

137 lines
4.5 KiB
Dart
Raw Normal View History

2020-06-06 10:06:54 +00:00
import 'package:chatting/touch_callback.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:chatting/personal_item_page.dart';
class PersonalPage extends StatefulWidget {
@override
_PersonalPageState createState() => _PersonalPageState();
}
class _PersonalPageState extends State<PersonalPage> {
2020-06-11 03:54:14 +00:00
2020-06-06 10:06:54 +00:00
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text("我的"),
centerTitle: true,
),
body: ListView(
children: <Widget>[
//图像部分实现
Container(
margin: const EdgeInsets.only(top: 20.0),
color: Colors.white,
height: 80.0,
child: TouchCallBack(
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
//添加图像
Container(
margin: const EdgeInsets.only(left: 12.0, right: 15.0),
2020-06-08 06:56:40 +00:00
child: Image.network("http://blogimages.jspang.com/blogtouxiang1.jpg",width: 70.0,height:70.0 )
),
SizedBox(
width: 30,
2020-06-06 10:06:54 +00:00
),
//用户及账号显示
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
2020-06-08 06:56:40 +00:00
Text('一秀',style: TextStyle(fontSize: 20.0,color: Color(0xff353535)),),
Container(
height: 10,
),
2020-06-06 10:06:54 +00:00
Text('账号 yixiu',style: TextStyle(fontSize: 14.0,color: Color(0xFFa9a9a9)),)
],
),
),
Container(
margin: const EdgeInsets.only(left: 12.0,right: 15.0),
child: Image.asset('',width: 24.0,height: 24.0,),
)
],
),
onPressed: (){},
),
),
Container(
margin: const EdgeInsets.only(top: 20.0,),
color: Colors.white,
child: PersonalItemPage(
title: '钱包',
imagePath: 'assets/images/ic_wallet.png',
),
),
Container(
margin: const EdgeInsets.only(top: 20.0),
color: Colors.white,
child: Column(
children: <Widget>[
PersonalItemPage(
title: '收藏',
imagePath: "assets/images/ic_collections.png",
),
Padding(
padding: const EdgeInsets.only(left: 15.0,right: 15.0),
child: Divider(
height: 0.5,
color: Color(0xffd9d9d9),
),
),
//**************************************************************
PersonalItemPage(
title: '我的相册',
imagePath: 'assets/images/ic_album.png',
),
Padding(
padding: const EdgeInsets.only(left: 15.0,right: 15.0),
child: Divider(
height: 0.5,
color: Color(0xffd9d9d9),
),
),
//**************************************************************
PersonalItemPage(
title: '卡包',
imagePath: 'assets/images/ic_cards_wallet.png',
),
Padding(
padding: const EdgeInsets.only(left: 15.0,right: 15.0),
child: Divider(
height: 0.5,
color: Color(0xffd9d9d9),
),
),
PersonalItemPage(
title: '表情',
imagePath: 'assets/images/ic_emotions.png',
),
//**************************************************************
] ),
),
Container(
margin: const EdgeInsets.only(top: 20.0),
color: Colors.white,
child: PersonalItemPage(
title: '设置',
imagePath: 'assets/images/ic_settings.png',
),
)
],
),
);
}
}