Skip to content
GitLab
菜单
为什么选择 GitLab
定价
联系销售
探索
为什么选择 GitLab
定价
联系销售
探索
登录
获取免费试用
主导航
搜索或转到…
项目
极狐 GitLab App
管理
动态
成员
标记
计划
议题
议题看板
里程碑
Wiki
代码
合并请求
仓库
分支
提交
标签
仓库图
比较修订版本
构建
流水线
作业
流水线计划
产物
部署
发布
Package registry
容器镜像库
模型注册表
运维
Terraform 模块
监控
服务台
分析
价值流分析
贡献者分析
CI/CD 分析
仓库分析
模型实验
帮助
帮助
支持
GitLab 文档
比较 GitLab 各版本
社区论坛
为极狐GitLab 提交贡献
提交反馈
隐私声明
快捷键
?
新增功能
4
代码片段
群组
项目
显示更多面包屑
lastsunday
极狐 GitLab App
提交
b5759b13
提交
b5759b13
编辑于
2 years ago
作者:
miao
提交者:
ling zhang
2 years ago
浏览文件
操作
下载
补丁
差异文件
feat: #23 Replace some real data
上级
522bdf40
No related branches found
No related tags found
无相关合并请求
变更
2
隐藏空白变更内容
行内
左右并排
显示
2 个更改的文件
lib/cn/gitlab/app/modules/backlog/backlog.dart
+32
-12
32 个添加, 12 个删除
lib/cn/gitlab/app/modules/backlog/backlog.dart
lib/cn/gitlab/app/modules/users/domain/issue.dart
+13
-0
13 个添加, 0 个删除
lib/cn/gitlab/app/modules/users/domain/issue.dart
有
45 个添加
和
12 个删除
lib/cn/gitlab/app/modules/backlog/backlog.dart
+
32
−
12
浏览文件 @
b5759b13
import
'dart:io'
;
import
'package:dio/dio.dart'
;
import
'package:flutter/material.dart'
;
import
'package:jihu_gitlab_app/cn/gitlab/app/modules/users/domain/issue.dart'
;
class
Backlog
extends
StatefulWidget
{
const
Backlog
({
Key
?
key
})
:
super
(
key:
key
);
...
...
@@ -8,6 +11,13 @@ class Backlog extends StatefulWidget {
}
class
_BacklogState
extends
State
<
Backlog
>
{
List
<
Issue
>
issues
=
[];
@override
void
initState
()
{
super
.
initState
();
getIssueData
();
}
@override
Widget
build
(
BuildContext
context
)
{
return
Scaffold
(
...
...
@@ -39,42 +49,42 @@ class _BacklogState extends State<Backlog> {
mainAxisSize:
MainAxisSize
.
min
,
children:
<
Widget
>[
Row
(
children:
const
[
Text
(
children:
[
const
Text
(
"你 "
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF1A1B36
),
fontWeight:
FontWeight
.
bold
),
),
Text
(
const
Text
(
"已分配 "
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF5C5963
)),
),
Text
(
"议题#
2
"
,
"议题#
${issues[index].iid}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF005BE9
)),
const
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF005BE9
)),
),
],
),
Column
(
children:
const
[
children:
[
Text
.
rich
(
TextSpan
(
children:
[
TextSpan
(
text:
"
'Feature:Users log in to the system with the JiHu GitLab SaaS account用户使用极狐 GitLab SaaS账户登录系统'at
"
,
style:
TextStyle
(
"
${issues[index].title}
"
,
style:
const
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF5C5963
))),
TextSpan
(
const
TextSpan
(
text:
"旗舰版演示/极狐 GitLab App产品线/极狐 GitLab"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF1A1B36
))),
TextSpan
(
text:
"到您自己 ·
1个月前
"
,
text:
"到您自己 ·
${issues[index].createdAt}
"
,
style:
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF5C5963
)),
const
TextStyle
(
fontSize:
14
,
color:
Color
(
0xFF5C5963
)),
)
])),
],
...
...
@@ -85,7 +95,17 @@ class _BacklogState extends State<Backlog> {
],
);
},
itemCount:
4
,
itemCount:
issues
.
length
,
);
}
void
getIssueData
()
async
{
var
dio
=
Dio
();
Response
response
=
await
dio
.
get
(
'https://jihulab.com/api/v4/issues?scope=assigned_to_me'
,
options:
Options
(
headers:
{
HttpHeaders
.
authorizationHeader
:
'Bearer 8d7e367bb4abbabd82cd022ac6a153a52a83e37494581d0eee32ff608b524433'
}),);
List
<
dynamic
>
data
=
response
.
data
;
List
<
Issue
>
issues
=
data
.
map
((
e
)
=
>
Issue
.
fromJson
(
e
))
.
toList
();
setState
(()
{
this
.
issues
=
issues
;
});
}
}
此差异已折叠。
点击以展开。
lib/cn/gitlab/app/modules/users/domain/issue.dart
0 → 100644
+
13
−
0
浏览文件 @
b5759b13
class
Issue
{
int
?
id
;
int
?
iid
;
String
?
title
;
String
?
state
;
String
?
createdAt
;
Issue
(
this
.
id
,
this
.
iid
,
this
.
title
,
this
.
state
,
this
.
createdAt
);
factory
Issue
.
fromJson
(
Map
<
String
,
dynamic
>
json
)
{
return
Issue
(
json
[
'id'
],
json
[
'iid'
],
json
[
'title'
],
json
[
'state'
],
json
[
'created_at'
]);
}
}
\ No newline at end of file
此差异已折叠。
点击以展开。
预览
0%
加载中
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
保存评论
取消
想要评论请
注册
或
登录