From b32a0e77392dc95d1153fda5391d637398b6b11c Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Fri, 13 Dec 2019 22:23:18 +0800 Subject: [PATCH] fix: user screen tab null --- lib/screens/user.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/screens/user.dart b/lib/screens/user.dart index eea6541..c6fabe8 100644 --- a/lib/screens/user.dart +++ b/lib/screens/user.dart @@ -24,7 +24,7 @@ final userRouter = RouterScreen( '/:login', (context, parameters) { final login = parameters['login'].first; - final tab = parameters['tab'].first; + final tab = parameters['tab']?.first; switch (tab) { case 'followers': return UsersScreen(login, UsersScreenType.follower); @@ -37,7 +37,7 @@ final userRouter = RouterScreen( case 'repositories': return RepositoriesScreen(login); default: - return UserScreen(parameters['login'].first); + return UserScreen(login); } }, );