diff --git a/assets/images/ic_default_avatar.png b/assets/images/ic_default_avatar.png new file mode 100644 index 0000000..136c87d Binary files /dev/null and b/assets/images/ic_default_avatar.png differ diff --git a/assets/images/ic_friends_add.png b/assets/images/ic_friends_add.png new file mode 100644 index 0000000..0612222 Binary files /dev/null and b/assets/images/ic_friends_add.png differ diff --git a/lib/chatting_friend.dart b/lib/chatting_friend.dart index a8c1011..ce5e1af 100644 --- a/lib/chatting_friend.dart +++ b/lib/chatting_friend.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'package:chatting/contact_list_page.dart'; class ChattinFriendPage extends StatefulWidget { @@ -9,9 +10,7 @@ class ChattinFriendPage extends StatefulWidget { class _ChattinFriendPageState extends State { @override Widget build(BuildContext context) { - return Scaffold( - body: Text("好友"), - ); + return ContactListPage(); } } diff --git a/lib/contact_appbar_page.dart b/lib/contact_appbar_page.dart new file mode 100644 index 0000000..d8f5d0a --- /dev/null +++ b/lib/contact_appbar_page.dart @@ -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: [ + //右按钮 + 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; + })); + }, + ), + ], + );; + } +} diff --git a/lib/discover_listview_cell.dart b/lib/discover_listview_cell.dart index 84b39ba..17f5dc6 100644 --- a/lib/discover_listview_cell.dart +++ b/lib/discover_listview_cell.dart @@ -73,13 +73,13 @@ class _DiscoverListViewCellPageState extends State { children: [ Row( children: [ - Image(width: 30, height: 30, image: AssetImage(widget.imageName)), + Image(width: 25, height: 25, image: AssetImage(widget.imageName)), SizedBox( - width: 30, + width: 25, ), Text(widget.title, style: TextStyle( - fontSize: 18 + fontSize: 16 ), ), ], diff --git a/lib/main.dart b/lib/main.dart index 7b5b365..6a75f46 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -34,3 +34,4 @@ final ThemeData _themeData =new ThemeData( scaffoldBackgroundColor: Color(0xFFebebeb), cardColor: Colors.green, ); + diff --git a/pubspec.yaml b/pubspec.yaml index ce99a72..961ab0d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -61,7 +61,9 @@ flutter: - assets/images/ic_goods_cart.png - assets/images/ic_search.png - assets/images/ic_game.png + - assets/images/ic_friends_add.png - assets/images/ic_applet.png + - assets/images/ic_default_avatar.png - assets/images/icon_right.png fonts: