Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
0d614983
提交
0d614983
authored
3月 14, 2024
作者:
yueweilu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
分类少的时候 靠左显示问题
上级
7a008415
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
43 行增加
和
39 行删除
+43
-39
filter.dart
lib/pages/library/widgets/filter.dart
+43
-39
没有找到文件。
lib/pages/library/widgets/filter.dart
浏览文件 @
0d614983
...
...
@@ -36,6 +36,7 @@ class _FilterPageState extends State<FilterPage> {
width:
double
.
infinity
,
padding:
EdgeInsets
.
only
(
bottom:
10
.
w
),
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
...
...
@@ -111,50 +112,53 @@ class _FilterPageState extends State<FilterPage> {
margin:
EdgeInsets
.
only
(
left:
10
.
w
,
bottom:
10
.
w
,
top:
10
.
w
),
child:
Text
(
title
,
style:
TextStyle
(
fontSize:
15
.
w
,
height:
1.6
,
color:
Colours
.
c3
,
fontWeight:
Fonts
.
boldSemi
),)
),
Wrap
(
spacing:
10
,
runSpacing:
10
,
alignment:
WrapAlignment
.
start
,
runAlignment:
WrapAlignment
.
start
,
children:
data
.
map
((
model
){
return
GestureDetector
(
onTap:
(){
setState
(()
{
for
(
FilterModel
model
in
data
){
model
.
selected
=
false
;
}
model
.
selected
=
!
model
.
selected
;
if
(
model
.
name
==
'读过'
||
model
.
name
==
'评分'
){
if
(
model
.
selected
){
model
.
up
=
!
model
.
up
;
Container
(
margin:
EdgeInsets
.
only
(
left:
10
.
w
),
child:
Wrap
(
spacing:
10
,
runSpacing:
10
,
alignment:
WrapAlignment
.
start
,
runAlignment:
WrapAlignment
.
start
,
children:
data
.
map
((
model
){
return
GestureDetector
(
onTap:
(){
setState
(()
{
for
(
FilterModel
model
in
data
){
model
.
selected
=
false
;
}
else
{
model
.
up
=
true
;
model
.
selected
=
!
model
.
selected
;
if
(
model
.
name
==
'读过'
||
model
.
name
==
'评分'
){
if
(
model
.
selected
){
model
.
up
=
!
model
.
up
;
}
else
{
model
.
up
=
true
;
}
}
}
});
},
child:
Container
(
height:
27
,
padding:
const
EdgeInsets
.
only
(
left:
15
,
right:
15
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
13.5
),
color:
model
.
selected
?
const
Color
(
0xFFC02D55
).
withOpacity
(
0.08
):
Colours
.
cF4
,
border:
model
.
selected
?
Border
.
all
(
width:
0.5
.
w
,
color:
AppTheme
.
primary
):
null
});
},
child:
Container
(
height:
27
,
padding:
const
EdgeInsets
.
only
(
left:
15
,
right:
15
),
decoration:
BoxDecoration
(
borderRadius:
BorderRadius
.
circular
(
13.5
),
color:
model
.
selected
?
const
Color
(
0xFFC02D55
).
withOpacity
(
0.08
):
Colours
.
cF4
,
border:
model
.
selected
?
Border
.
all
(
width:
0.5
.
w
,
color:
AppTheme
.
primary
):
null
),
child:
model
.
name
==
'读过'
||
model
.
name
==
'评分'
?
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Text
(
model
.
name
??
''
,
style:
TextStyle
(
fontSize:
13
,
height:
1.4
,
color:
model
.
selected
?
AppTheme
.
primary
:
Colours
.
c3
),
textAlign:
TextAlign
.
center
,),
Image
.
asset
(
model
.
selected
?
model
.
up
?
'assets/images/filter_up.png'
:
'assets/images/filter_down.png'
:
'assets/images/filter_unselect.png'
),
],
):
Padding
(
padding:
EdgeInsets
.
only
(
top:
4
.
w
),
child:
Text
(
model
.
name
??
''
,
style:
TextStyle
(
fontSize:
13
,
height:
1.4
,
color:
model
.
selected
?
AppTheme
.
primary
:
Colours
.
c3
),
textAlign:
TextAlign
.
end
,),),
),
child:
model
.
name
==
'读过'
||
model
.
name
==
'评分'
?
Row
(
mainAxisSize:
MainAxisSize
.
min
,
children:
[
Text
(
model
.
name
??
''
,
style:
TextStyle
(
fontSize:
13
,
height:
1.4
,
color:
model
.
selected
?
AppTheme
.
primary
:
Colours
.
c3
),
textAlign:
TextAlign
.
center
,),
Image
.
asset
(
model
.
selected
?
model
.
up
?
'assets/images/filter_up.png'
:
'assets/images/filter_down.png'
:
'assets/images/filter_unselect.png'
),
],
):
Padding
(
padding:
EdgeInsets
.
only
(
top:
4
.
w
),
child:
Text
(
model
.
name
??
''
,
style:
TextStyle
(
fontSize:
13
,
height:
1.4
,
color:
model
.
selected
?
AppTheme
.
primary
:
Colours
.
c3
),
textAlign:
TextAlign
.
end
,),),
),
);
}).
toList
(),
),
);
}).
toList
(),
),
)
],
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论