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 { @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("我的"), centerTitle: true, ), body: ListView( children: [ //图像部分实现 Container( margin: const EdgeInsets.only(top: 20.0), color: Colors.white, height: 80.0, child: TouchCallBack( child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ //添加图像 Container( margin: const EdgeInsets.only(left: 12.0, right: 15.0), child: Image.network("http://blogimages.jspang.com/blogtouxiang1.jpg",width: 70.0,height:70.0 ) ), SizedBox( width: 30, ), //用户及账号显示 Expanded( child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('一秀',style: TextStyle(fontSize: 20.0,color: Color(0xff353535)),), Container( height: 10, ), 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: [ 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', ), ) ], ), ); } }