diff --git a/lib/components/pagination.dart b/lib/components/pagination.dart index 67cde6f6..438be3fe 100644 --- a/lib/components/pagination.dart +++ b/lib/components/pagination.dart @@ -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 { diff --git a/lib/main.dart b/lib/main.dart index c9825764..e567cfb1 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -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 { @@ -128,49 +129,53 @@ class _MyHomePageState extends State } 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: [ - 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: [ - 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: [ + 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( + 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: [ - 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(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() {