From f79317065b9320fca0114981820151107ca2f9c2 Mon Sep 17 00:00:00 2001 From: w-R <953969641@qq.com> Date: Tue, 26 Oct 2021 22:30:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mine/mine_view/mine_item.dart | 3 ++- lib/mine/release_page.dart | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index 4ee2a33d..092ca029 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -69,7 +69,8 @@ class _MineItem extends State { return; } Navigator.of(context) - .pushNamed('/router/releasePage'); + .pushNamed('/router/releasePage', + arguments: {}); }); }, child: mineItem( diff --git a/lib/mine/release_page.dart b/lib/mine/release_page.dart index dd0a21c1..f4191078 100644 --- a/lib/mine/release_page.dart +++ b/lib/mine/release_page.dart @@ -24,6 +24,7 @@ class _ReleasePage extends State { RefreshController refreshController = RefreshController(); ApiService apiService; int pageNum = 0; + String userId; List comments = []; @@ -42,6 +43,7 @@ class _ReleasePage extends State { queryCommunity() async { if (apiService == null) { SharedPreferences value = await SharedPreferences.getInstance(); + userId = value.getString('userId'); apiService = ApiService( Dio(), context: context, @@ -119,7 +121,7 @@ class _ReleasePage extends State { Navigator.of(context).pushNamed( '/router/community_details', arguments: { - "comment": comments[position], + "comment": comments[position],"userId":userId, }, ); },