1
0
mirror of https://github.com/git-touch/git-touch synced 2024-12-18 19:22:54 +01:00

fix(gitlab): issue router

This commit is contained in:
Rongjian Zhang 2020-01-30 17:20:14 +08:00
parent 39c360f281
commit e2e0f6ba25

View File

@ -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) {