Skip to content

Commit

Permalink
Merge branch 'CrazyCoderShi-develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxu317317 committed Jan 14, 2019
2 parents 26b2d3a + a2dcfb3 commit 9e22325
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 38 deletions.
2 changes: 1 addition & 1 deletion lib/components/pagination.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Pagination extends StatelessWidget {
{'image': 'https://img.alicdn.com/tfs/TB1W4hMAwHqK1RjSZJnXXbNLpXa-519-260.jpg', 'type': 0, 'id': 9695909, 'url': 'https://www.zhihu.com/question/294145797/answer/551162834', 'title': '为什么阿里巴巴、腾讯和 Google 之类的企业都在使用 Flutter 开发 App?'},
{'image': 'https://img.alicdn.com/tfs/TB1XmFIApzqK1RjSZSgXXcpAVXa-720-338.jpg', 'type': 0, 'id': 9695859, 'url': 'https://zhuanlan.zhihu.com/p/51696594', 'title': 'Flutter 1.0 正式发布: Google 的便携 UI 工具包'},
{'image': 'https://img.alicdn.com/tfs/TB1mClCABLoK1RjSZFuXXXn0XXa-600-362.jpg', 'type': 0, 'id': 96956491409, 'url':'https://zhuanlan.zhihu.com/p/53497167','title': 'Flutter 示范应用现已开源 — 万物起源(The History of Everything)'},
{'image': 'https://img.alicdn.com/tfs/TB1fXxIAAvoK1RjSZFNXXcxMVXa-600-362.jpg', 'type': 0, 'id': 9695816, 'url': 'https://mp.weixin.qq.com/s?__biz=MzAwODY4OTk2Mg==&mid=2652048101&idx=1&sn=20296088e4bd8ca33c5c9991167d9f7d&chksm=808caaa0b7fb23b65c0e5806209f8d86da6732f3a00a70353f3606018339518b0a8656f14dc5&mpshare=1&scene=2&srcid=0106SZapVysZdIS6Oc5AhNH6&from=timeline&ascene=2&devicetype=android-27&version=27000038&nettype=WIFI&abtest_cookie=BQABAAgACgALABMAFAAFAJ2GHgAjlx4AV5keAJuZHgCcmR4AAAA%3D&lang=zh_CN&pass_ticket=4K1%2FUpsxP4suPj2iubR17wbAP7r9LW9iYrPAC2dppTqv7j7JO5FWMXtcKeBRxueV&wx_header=1', 'title': 'Flutter 与 Material Design 双剑合璧,助您构建精美应用'}
{'image': 'https://img.alicdn.com/tfs/TB1fXxIAAvoK1RjSZFNXXcxMVXa-600-362.jpg', 'type': 0, 'id': 9695816, 'url': 'https://mp.weixin.qq.com/s?__biz=MzAwODY4OTk2Mg==&mid=2652048101&idx=1&sn=20296088e4bd8ca33c5c9991167d9f7d&chksm=808caaa0b7fb23b65c0e5806209f8d86da6732f3a00a70353f3606018339518b0a8656f14dc5&mpsshare=1&scene=2&srcid=0106SZapVysZdIS6Oc5AhNH6&from=timeline&ascene=2&devicetype=android-27&version=27000038&nettype=WIFI&abtest_cookie=BQABAAgACgALABMAFAAFAJ2GHgAjlx4AV5keAJuZHgCcmR4AAAA%3D&lang=zh_CN&pass_ticket=4K1%2FUpsxP4suPj2iubR17wbAP7r9LW9iYrPAC2dppTqv7j7JO5FWMXtcKeBRxueV&wx_header=1', 'title': 'Flutter 与 Material Design 双剑合璧,助您构建精美应用'}
];

void _launchURL(String url) async {
Expand Down
79 changes: 42 additions & 37 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import 'common/provider.dart';
import 'model/widget.dart';
import './widgets/index.dart';
import 'package:flutter_go/components/search_input.dart';

const int ThemeColor = 0xFFC91B3A;

class MyApp extends StatelessWidget {
Expand Down Expand Up @@ -128,49 +129,53 @@ class _MyHomePageState extends State<MyHomePage>
} else {
return null;
}
}, (value) {
}, () {});
}, (value) {}, () {});
}

@override
Widget build(BuildContext context) {
return new Scaffold(
appBar: new AppBar(title: buildSearchInput(context)),
body: new TabBarView(controller: controller, children: <Widget>[
new FirstPage(),
new WidgetPage(db),
new CollectionPage(),
new FourthPage()
]),
bottomNavigationBar: new Material(
color: const Color(0xFFF0EEEF), //底部导航栏主题颜色
child: new Container(
height: 65.0,
decoration: BoxDecoration(
color: const Color(0xFFF0F0F0),
boxShadow: <BoxShadow>[
new BoxShadow(
color: const Color(0xFFd0d0d0),
blurRadius: 3.0,
spreadRadius: 2.0,
offset: Offset(-1.0, -1.0),
),
],
appBar: new AppBar(title: buildSearchInput(context)),
body: new TabBarView(controller: controller, children: <Widget>[
new FirstPage(),
new WidgetPage(db),
new CollectionPage(),
new FourthPage()
]),
bottomNavigationBar: Material(
color: const Color(0xFFF0EEEF), //底部导航栏主题颜色
child: SafeArea(
child: Container(
height: 65.0,
decoration: BoxDecoration(
color: const Color(0xFFF0F0F0),
boxShadow: <BoxShadow>[
BoxShadow(
color: const Color(0xFFd0d0d0),
blurRadius: 3.0,
spreadRadius: 2.0,
offset: Offset(-1.0, -1.0),
),
child: new TabBar(
controller: controller,
indicatorColor:
Theme.of(context).primaryColor, //tab标签的下划线颜色
// labelColor: const Color(0xFF000000),
indicatorWeight: 3.0,
labelColor: Theme.of(context).primaryColor,
unselectedLabelColor: const Color(0xFF8E8E8E),
tabs: <Tab>[
new Tab(text: '业界动态', icon: new Icon(Icons.language)),
new Tab(text: '组件', icon: new Icon(Icons.extension)),
new Tab(text: '组件收藏', icon: new Icon(Icons.star)),
new Tab(text: '关于手册', icon: new Icon(Icons.favorite)),
]))));
],
),
child: TabBar(
controller: controller,
indicatorColor: Theme.of(context).primaryColor, //tab标签的下划线颜色
// labelColor: const Color(0xFF000000),
indicatorWeight: 3.0,
labelColor: Theme.of(context).primaryColor,
unselectedLabelColor: const Color(0xFF8E8E8E),
tabs: <Tab>[
Tab(text: '业界动态', icon: Icon(Icons.language)),
Tab(text: '组件', icon: Icon(Icons.extension)),
Tab(text: '组件收藏', icon: Icon(Icons.star)),
Tab(text: '关于手册', icon: Icon(Icons.favorite)),
],
),
),
),
),
);
}

void _onTabChange() {
Expand Down

0 comments on commit 9e22325

Please sign in to comment.