1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-16 18:28:51 +01:00

fix: user screen tab null

This commit is contained in:
Rongjian Zhang 2019-12-13 22:23:18 +08:00
parent d71d67aa9f
commit b32a0e7739

View File

@ -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);
}
},
);