Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
c183137c
提交
c183137c
authored
2月 26, 2024
作者:
maodou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ui修改
上级
e33cd36c
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
118 行增加
和
12 行删除
+118
-12
view.dart
lib/pages/course/view.dart
+3
-2
view.dart
lib/pages/mine/view.dart
+3
-2
assets_picker.dart
lib/utils/assets_picker.dart
+112
-8
没有找到文件。
lib/pages/course/view.dart
浏览文件 @
c183137c
...
...
@@ -46,10 +46,11 @@ class _CoursePageState extends State<CoursePage> {
child:
badges
.
Badge
(
position:
badges
.
BadgePosition
.
topEnd
(
top:
-
5
.
w
,
end:
0
),
showBadge:
controller
.
num
==
0
?
false
:
true
,
badgeContent:
Text
(
controller
.
num
.
toString
(),
style:
TextStyle
(
fontSize:
7
.
w
,
color:
Colors
.
white
),),
badgeContent:
Text
(
controller
.
num
.
toString
(),
style:
TextStyle
(
fontSize:
9
.
w
,
color:
Colors
.
white
,
fontWeight:
Fonts
.
boldSemi
),),
badgeStyle:
const
badges
.
BadgeStyle
(
badgeColor:
AppTheme
.
primary
,
shape:
badges
.
BadgeShape
.
circle
shape:
badges
.
BadgeShape
.
circle
,
padding:
EdgeInsets
.
all
(
3
),
),
child:
CustomButton
.
icon
(
padding:
EdgeInsets
.
zero
,
...
...
lib/pages/mine/view.dart
浏览文件 @
c183137c
...
...
@@ -52,10 +52,11 @@ class _MinePageState extends State<MinePage> {
child:
badges
.
Badge
(
position:
badges
.
BadgePosition
.
topEnd
(
top:
-
5
.
w
,
end:
0
),
showBadge:
controller
.
num
==
0
?
false
:
true
,
badgeContent:
Text
(
controller
.
num
.
toString
(),
style:
TextStyle
(
fontSize:
8
.
w
,
color:
Colors
.
white
),),
badgeContent:
Text
(
controller
.
num
.
toString
(),
style:
TextStyle
(
fontSize:
9
.
w
,
color:
Colors
.
white
,
fontWeight:
Fonts
.
bold
),),
badgeStyle:
const
badges
.
BadgeStyle
(
badgeColor:
AppTheme
.
primary
,
shape:
badges
.
BadgeShape
.
circle
shape:
badges
.
BadgeShape
.
circle
,
padding:
EdgeInsets
.
all
(
3
),
),
child:
CustomButton
.
icon
(
padding:
EdgeInsets
.
zero
,
...
...
lib/utils/assets_picker.dart
浏览文件 @
c183137c
...
...
@@ -12,10 +12,11 @@ abstract class AssetsPicker {
})
async
{
if
(!(
await
Access
.
photos
()))
{
if
(
context
.
mounted
)
{
CustomDialog
.
showAccess
(
context:
context
,
content:
const
Text
(
'获取相册权限'
),
);
// CustomDialog.showAccess(
// context: context,
// content: const Text('获取相册权限'),
// );
_showSettingDialog
(
context
,
'获取相册权限'
);
}
return
null
;
}
...
...
@@ -34,10 +35,11 @@ abstract class AssetsPicker {
})
async
{
if
(!(
await
Access
.
photos
()))
{
if
(
context
.
mounted
)
{
CustomDialog
.
showAccess
(
context:
context
,
content:
const
Text
(
'获取拍照权限'
),
);
// CustomDialog.showAccess(
// context: context,
// content: const Text('获取拍照权限'),
// );
_showSettingDialog
(
context
,
'获取拍照权限'
);
}
return
null
;
}
...
...
@@ -48,4 +50,106 @@ abstract class AssetsPicker {
);
}
static
_showSettingDialog
(
BuildContext
context
,
String
content
)
{
showDialog
(
context:
context
,
builder:
(
BuildContext
context
)
{
return
WillPopScope
(
onWillPop:
()
=>
Future
.
value
(
true
),
child:
AlertDialog
(
insetPadding:
EdgeInsets
.
zero
,
// 设置水平边距
shape:
RoundedRectangleBorder
(
borderRadius:
BorderRadius
.
circular
(
8.0
.
w
),
),
// 去除操作按钮区域的内边距
actionsPadding:
EdgeInsets
.
zero
,
title:
Container
(
alignment:
Alignment
.
center
,
child:
Text
(
'权限申请'
,
style:
TextStyle
(
fontSize:
20
.
w
,
color:
Colours
.
c3
,
fontWeight:
Fonts
.
boldSemi
),),
),
actions:
<
Widget
>[
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
Column
(
mainAxisAlignment:
MainAxisAlignment
.
start
,
children:
[
Padding
(
padding:
EdgeInsets
.
only
(
top:
5.5
.
w
),
child:
Text
(
content
,
style:
TextStyle
(
fontSize:
15
.
w
,
color:
Colours
.
c9
,
fontWeight:
Fonts
.
medium
),
),
),
SizedBox
(
height:
22
.
w
,
),
Container
(
height:
1
,
// 设置分割线的高度
width:
216.5
.
w
,
// 设置分割线的宽度
color:
Colours
.
cLine
,
// 设置分割线的颜色
),
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceBetween
,
children:
[
Padding
(
padding:
EdgeInsets
.
only
(
right:
28
.
w
),
child:
GestureDetector
(
child:
Container
(
width:
85
.
w
,
color:
Colours
.
cFF
,
alignment:
Alignment
.
center
,
child:
const
Text
(
'取消'
,
style:
TextStyle
(
color:
Colours
.
c6
,
fontSize:
15
,
fontWeight:
Fonts
.
medium
),
),
),
onTap:
()
=>
Navigator
.
of
(
context
).
pop
(),
),),
Container
(
height:
39.5
.
w
,
// 设置分割线的高度
width:
1
,
// 设置分割线的宽度
color:
Colours
.
cLine
,
// 设置分割线的颜色
),
Padding
(
padding:
EdgeInsets
.
only
(
left:
28
.
w
),
child:
GestureDetector
(
child:
Container
(
width:
85
.
w
,
color:
Colours
.
cFF
,
alignment:
Alignment
.
center
,
child:
const
Text
(
'设置'
,
style:
TextStyle
(
color:
Colours
.
cAB1941
,
fontSize:
15
,
fontWeight:
Fonts
.
boldSemi
),
),
),
onTap:
()
{
Access
.
setting
();
},
),
),
],
),
],
),
],
),
],
),
);
},
);
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论