From 3f325af386d0a6746de408629b766fbb14c60a8b Mon Sep 17 00:00:00 2001 From: "sanfan.hx" Date: Thu, 15 Aug 2019 16:40:52 +0800 Subject: [PATCH] fixed: collection err --- .../collection_page/collection_full_page.dart | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/lib/views/collection_page/collection_full_page.dart b/lib/views/collection_page/collection_full_page.dart index 292be897..d9ce39fd 100644 --- a/lib/views/collection_page/collection_full_page.dart +++ b/lib/views/collection_page/collection_full_page.dart @@ -58,6 +58,7 @@ class _CollectionFullPageState extends State { } Widget _renderList(context, index) { + if (index == 0) { return Container( height: 40.0, @@ -85,6 +86,7 @@ class _CollectionFullPageState extends State { } else { _icons = Icons.extension; } + String targetRouter = _collectionList[index - 1].router; return Container( padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 5.0), margin: const EdgeInsets.only(bottom: 7.0), @@ -106,7 +108,7 @@ class _CollectionFullPageState extends State { color: Theme.of(context).primaryColor, ), title: Text( - Uri.decodeComponent(_collectionList[index - 1].name), + _collectionList[index - 1].name, overflow: TextOverflow.ellipsis, style: TextStyle(fontSize: 17.0), ), @@ -114,17 +116,8 @@ class _CollectionFullPageState extends State { Icon(Icons.keyboard_arrow_right, color: Colors.grey, size: 30.0), onTap: () { Application.router.navigateTo( - context, _collectionList[index - 1].router, + context, targetRouter.toLowerCase(), transition: TransitionType.inFromRight); - - // if (_collectionList[index - 1].router.contains('http')) { - // // 注意这里title已经转义过了 - // Application.router.navigateTo(context, - // '${Routes.webViewPage}?title=${_collectionList[index - 1].name}&url=${Uri.encodeComponent(_collectionList[index - 1].router)}'); - // } else { - // Application.router - // .navigateTo(context, "${_collectionList[index - 1].router}"); - // } }, ), );