mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-05-22 07:16:26 +08:00
fixed: collection err
This commit is contained in:
@ -58,6 +58,7 @@ class _CollectionFullPageState extends State<CollectionFullPage> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _renderList(context, index) {
|
Widget _renderList(context, index) {
|
||||||
|
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 40.0,
|
height: 40.0,
|
||||||
@ -85,6 +86,7 @@ class _CollectionFullPageState extends State<CollectionFullPage> {
|
|||||||
} else {
|
} else {
|
||||||
_icons = Icons.extension;
|
_icons = Icons.extension;
|
||||||
}
|
}
|
||||||
|
String targetRouter = _collectionList[index - 1].router;
|
||||||
return Container(
|
return Container(
|
||||||
padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 5.0),
|
padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 5.0),
|
||||||
margin: const EdgeInsets.only(bottom: 7.0),
|
margin: const EdgeInsets.only(bottom: 7.0),
|
||||||
@ -106,7 +108,7 @@ class _CollectionFullPageState extends State<CollectionFullPage> {
|
|||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
),
|
),
|
||||||
title: Text(
|
title: Text(
|
||||||
Uri.decodeComponent(_collectionList[index - 1].name),
|
_collectionList[index - 1].name,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(fontSize: 17.0),
|
style: TextStyle(fontSize: 17.0),
|
||||||
),
|
),
|
||||||
@ -114,17 +116,8 @@ class _CollectionFullPageState extends State<CollectionFullPage> {
|
|||||||
Icon(Icons.keyboard_arrow_right, color: Colors.grey, size: 30.0),
|
Icon(Icons.keyboard_arrow_right, color: Colors.grey, size: 30.0),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Application.router.navigateTo(
|
Application.router.navigateTo(
|
||||||
context, _collectionList[index - 1].router,
|
context, targetRouter.toLowerCase(),
|
||||||
transition: TransitionType.inFromRight);
|
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}");
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user