From e2e0f6ba2527cd0348844774b5cd223d12954122 Mon Sep 17 00:00:00 2001 From: Rongjian Zhang Date: Thu, 30 Jan 2020 17:20:14 +0800 Subject: [PATCH] fix(gitlab): issue router --- lib/screens/gitlab_issue.dart | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/screens/gitlab_issue.dart b/lib/screens/gitlab_issue.dart index d69afe4..d5cba39 100644 --- a/lib/screens/gitlab_issue.dart +++ b/lib/screens/gitlab_issue.dart @@ -10,16 +10,21 @@ import 'package:timeago/timeago.dart' as timeago; import 'package:tuple/tuple.dart'; final gitlabIssueRouter = RouterScreen( - '/gitlab/projects/:id/issues/:iid', - (context, params) => GitlabIssueScreen( - int.parse(['id'].first), int.parse(params['iid'].first))); + '/gitlab/projects/:id/issues/:iid', + (context, params) { + return GitlabIssueScreen( + int.parse(params['id'].first), + int.parse(params['iid'].first), + ); + }, +); class GitlabIssueScreen extends StatelessWidget { final int projectId; final int iid; final bool isMr; - GitlabIssueScreen(this.projectId, this.iid, {this.isMr}); + GitlabIssueScreen(this.projectId, this.iid, {this.isMr = false}); @override Widget build(BuildContext context) {