增加好友列表页
parent
468bead526
commit
c1b3f02856
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:chatting/contact_list_page.dart';
|
||||||
|
|
||||||
|
|
||||||
class ChattinFriendPage extends StatefulWidget {
|
class ChattinFriendPage extends StatefulWidget {
|
||||||
|
|
@ -9,9 +10,7 @@ class ChattinFriendPage extends StatefulWidget {
|
||||||
class _ChattinFriendPageState extends State<ChattinFriendPage> {
|
class _ChattinFriendPageState extends State<ChattinFriendPage> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return ContactListPage();
|
||||||
body: Text("好友"),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,53 @@
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
//好友列表 appbar 实现
|
||||||
|
|
||||||
|
class ContactAppBarPage extends StatelessWidget {
|
||||||
|
|
||||||
|
Color WechatThemeColor = Colors.white;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppBar(
|
||||||
|
backgroundColor: WechatThemeColor,
|
||||||
|
title: Text('通讯录'), //标题
|
||||||
|
leading: //左按钮
|
||||||
|
GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(left: 15, top: 15),
|
||||||
|
child: Text(
|
||||||
|
'更多',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context)
|
||||||
|
.push(MaterialPageRoute(builder: (BuildContext context) {
|
||||||
|
return null;
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
actions: <Widget>[
|
||||||
|
//右按钮
|
||||||
|
GestureDetector(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(right: 15),
|
||||||
|
child: Image(
|
||||||
|
image: AssetImage('images/icon_friends_add.png'),
|
||||||
|
width: 25,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
onTap: () {
|
||||||
|
Navigator.of(context)
|
||||||
|
.push(MaterialPageRoute(builder: (BuildContext context) {
|
||||||
|
return null;
|
||||||
|
}));
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -73,13 +73,13 @@ class _DiscoverListViewCellPageState extends State<DiscoverListViewCellPage> {
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Row(
|
Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Image(width: 30, height: 30, image: AssetImage(widget.imageName)),
|
Image(width: 25, height: 25, image: AssetImage(widget.imageName)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 30,
|
width: 25,
|
||||||
),
|
),
|
||||||
Text(widget.title,
|
Text(widget.title,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 18
|
fontSize: 16
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -34,3 +34,4 @@ final ThemeData _themeData =new ThemeData(
|
||||||
scaffoldBackgroundColor: Color(0xFFebebeb),
|
scaffoldBackgroundColor: Color(0xFFebebeb),
|
||||||
cardColor: Colors.green,
|
cardColor: Colors.green,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,9 @@ flutter:
|
||||||
- assets/images/ic_goods_cart.png
|
- assets/images/ic_goods_cart.png
|
||||||
- assets/images/ic_search.png
|
- assets/images/ic_search.png
|
||||||
- assets/images/ic_game.png
|
- assets/images/ic_game.png
|
||||||
|
- assets/images/ic_friends_add.png
|
||||||
- assets/images/ic_applet.png
|
- assets/images/ic_applet.png
|
||||||
|
- assets/images/ic_default_avatar.png
|
||||||
- assets/images/icon_right.png
|
- assets/images/icon_right.png
|
||||||
|
|
||||||
fonts:
|
fonts:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue