Skip to content

Commit

Permalink
修改文件名
Browse files Browse the repository at this point in the history
  • Loading branch information
ForeverCarousel committed Feb 18, 2019
1 parent d4fc302 commit e8d3be1
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 9 deletions.
Binary file added assets/fonts/iconfont.ttf
Binary file not shown.
5 changes: 5 additions & 0 deletions lib/Common/wechat_constant.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//定义一些常量 类似于iOS中的宏定义 这个类功能跟macro类相似

class WechatColors {
static const WechatAppbarColor = 0xff303030;
}
File renamed without changes.
File renamed without changes.
18 changes: 15 additions & 3 deletions lib/Home/WechatHomePage.dart → lib/Home/wechat_home_page.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import '../Common/wechat_constant.dart' show WechatColors;
// import 'package:pull_to_refresh/pull_to_refresh.dart';

class WechatHomePage extends StatefulWidget {
Expand All @@ -19,8 +20,19 @@ class _WechatHomePageState extends State<WechatHomePage> {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
backgroundColor: Color(WechatColors.WechatAppbarColor),
title: Text("微信"),
centerTitle: true,
actions: <Widget>[
IconButton(
icon: Icon(Icons.search),
onPressed: (){},
),
IconButton(
icon: Icon(Icons.add),
onPressed: (){},
)
],
),
body: ListView.builder(
physics: BouncingScrollPhysics(),
Expand All @@ -47,11 +59,11 @@ class _WechaHomeListCellState extends State<WechaHomeListCell> {
return Container(
width: 400,
height: 60,
color: Colors.lightBlue,
color: Colors.white,
child: ListTile(
title: Text("姓名"),
subtitle: Text("最后一条消息"),
leading: Icon(Icons.contact_mail),
subtitle: Text("消息消息消息消息消息消息"),
leading: Icon(Icons.person),
trailing: Icon(Icons.navigate_next),
)
);
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions lib/WechatRootContainer.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'Home/WechatHomePage.dart';
import 'Contacts/WechatContactsPage.dart';
import 'Discovery/WechatDiscoveryPage.dart';
import 'Me/WechatProfilePage.dart';
import 'Home/wechat_home_page.dart';
import 'Contacts/wechat_contacts_page.dart';
import 'Discovery/wechat_discovery_page.dart';
import 'Me/wechat_profile_page.dart';

/*
此类的实例作为MaterialApp组件的Home属性 用于构建一个底部有TabBar 顶部有导航栏的容器组件
Expand Down
5 changes: 3 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ dev_dependencies:
flutter_test:
sdk: flutter


flutter:
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg

fonts:
- family: WechatAppFont
- asset: assets/fonts/iconfont.ttf

0 comments on commit e8d3be1

Please sign in to comment.