Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
8a35a394
提交
8a35a394
authored
2月 23, 2024
作者:
maodou
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
页面修改
上级
4f37ba39
全部展开
显示空白字符变更
内嵌
并排
正在显示
18 个修改的文件
包含
119 行增加
和
108 行删除
+119
-108
search.png
assets/images/2.0x/search.png
+0
-0
search.png
assets/images/3.0x/search.png
+0
-0
search.png
assets/images/search.png
+0
-0
item.dart
lib/pages/book_category/widgets/item.dart
+2
-2
view.dart
lib/pages/book_detail/view.dart
+7
-3
book.dart
lib/pages/book_detail/widgets/book.dart
+15
-13
study.dart
lib/pages/book_detail/widgets/study.dart
+3
-3
view.dart
lib/pages/book_info/view.dart
+4
-2
book.dart
lib/pages/course/widgets/book.dart
+3
-2
view.dart
lib/pages/library/view.dart
+8
-4
controller.dart
lib/pages/login/controller.dart
+1
-1
view.dart
lib/pages/main/view.dart
+24
-0
view.dart
lib/pages/user_order_evaluate/view.dart
+12
-66
validator.dart
lib/utils/validator.dart
+2
-2
AssetImageIconData.dart
lib/widgets/AssetImageIconData.dart
+11
-0
index.dart
lib/widgets/index.dart
+1
-0
input.dart
lib/widgets/input.dart
+26
-10
pubspec.lock
pubspec.lock
+0
-0
没有找到文件。
assets/images/2.0x/search.png
0 → 100644
浏览文件 @
8a35a394
1.4 KB
assets/images/3.0x/search.png
0 → 100644
浏览文件 @
8a35a394
2.6 KB
assets/images/search.png
0 → 100644
浏览文件 @
8a35a394
647 Bytes
lib/pages/book_category/widgets/item.dart
浏览文件 @
8a35a394
...
@@ -101,8 +101,8 @@ class _BuildItemState extends State<BuildItem> {
...
@@ -101,8 +101,8 @@ class _BuildItemState extends State<BuildItem> {
Widget
_buildSection
(
ChapterModel
model
){
Widget
_buildSection
(
ChapterModel
model
){
return
Container
(
return
Container
(
color:
Colors
.
white
,
color:
Colors
.
white
,
padding:
const
EdgeInsets
.
only
(
left:
60
),
padding:
const
EdgeInsets
.
only
(
left:
60
,
bottom:
4
),
child:
Text
(
model
.
name
??
''
,
style:
TextStyle
(
fontSize:
1
2
,
color:
model
.
seen
==
0
?
Colours
.
c3
:
Colours
.
c9
,
height:
2
),),
child:
Text
(
model
.
name
??
''
,
style:
TextStyle
(
fontSize:
1
4
,
color:
model
.
seen
==
0
?
Colours
.
c3
:
Colours
.
c9
,
height:
2
),),
);
);
}
}
}
}
lib/pages/book_detail/view.dart
浏览文件 @
8a35a394
...
@@ -28,7 +28,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
...
@@ -28,7 +28,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
child:
Scaffold
(
child:
Scaffold
(
appBar:
CustomAppBar
(
appBar:
CustomAppBar
(
backgroundColor:
const
Color
(
0xFFAB1941
).
withOpacity
(
0.02
),
backgroundColor:
const
Color
(
0xFFAB1941
).
withOpacity
(
0.02
),
title:
const
Text
(
'详情'
),
title:
const
Text
(
'详情'
,
style:
TextStyle
(
fontSize:
17
),
),
actions:
[
actions:
[
CustomButton
.
icon
(
CustomButton
.
icon
(
padding:
EdgeInsets
.
zero
,
padding:
EdgeInsets
.
zero
,
...
@@ -66,7 +66,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
...
@@ -66,7 +66,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
child:
TabBar
(
child:
TabBar
(
labelColor:
AppTheme
.
primary
,
labelColor:
AppTheme
.
primary
,
// isScrollable: true,
// isScrollable: true,
labelStyle:
TextStyle
(
fontSize:
15
.
w
,
height:
1.4
,
fontWeight:
Fonts
.
medium
),
labelStyle:
TextStyle
(
fontSize:
15
.
w
,
height:
1.4
,
fontWeight:
Fonts
.
boldSemi
),
unselectedLabelColor:
Colours
.
c9
,
unselectedLabelColor:
Colours
.
c9
,
unselectedLabelStyle:
TextStyle
(
fontSize:
15
.
w
,
height:
1.4
),
unselectedLabelStyle:
TextStyle
(
fontSize:
15
.
w
,
height:
1.4
),
indicatorSize:
TabBarIndicatorSize
.
label
,
indicatorSize:
TabBarIndicatorSize
.
label
,
...
@@ -76,6 +76,10 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
...
@@ -76,6 +76,10 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
controller:
controller
.
tabController
,
controller:
controller
.
tabController
,
),
),
),
),
Container
(
height:
1
,
color:
const
Color
(
0xFFF9F9F9
),
),
Expanded
(
Expanded
(
child:
TabBarView
(
child:
TabBarView
(
controller:
controller
.
tabController
,
controller:
controller
.
tabController
,
...
@@ -185,7 +189,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
...
@@ -185,7 +189,7 @@ class _BookDetailPageState extends State<BookDetailPage> with SingleTickerProvid
height:
35
.
w
,
height:
35
.
w
,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
padding:
EdgeInsets
.
symmetric
(
vertical:
8
.
w
),
padding:
EdgeInsets
.
symmetric
(
vertical:
8
.
w
),
child:
Text
(
'阅读'
,
style:
TextStyle
(
fontSize:
13
.
w
,
color:
AppTheme
.
primary
,
height:
1.5
),),
child:
Text
(
'阅读'
,
style:
TextStyle
(
fontSize:
13
.
w
,
color:
AppTheme
.
primary
,
height:
1.5
,
fontWeight:
Fonts
.
boldSemi
),),
),
),
),
),
)
)
...
...
lib/pages/book_detail/widgets/book.dart
浏览文件 @
8a35a394
...
@@ -10,16 +10,16 @@ class BuildBook extends StatelessWidget {
...
@@ -10,16 +10,16 @@ class BuildBook extends StatelessWidget {
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
Container
(
return
Container
(
decoration:
const
BoxDecoration
(
//
decoration: const BoxDecoration(
// color: Colors.red,
//
// color: Colors.red,
gradient:
LinearGradient
(
//
gradient: LinearGradient(
colors:
[
Color
(
0xFFF7F5F5
),
Color
(
0xFFFFFFFF
)],
//
colors: [Color(0xFFF7F5F5),Color(0xFFFFFFFF)],
begin:
Alignment
.
topCenter
,
//
begin: Alignment.topCenter,
end:
Alignment
.
bottomCenter
,
//
end: Alignment.bottomCenter,
),
//
),
),
//
),
// margin: const EdgeInsets.only(left: 10,right: 10,top: 10),
// margin: const EdgeInsets.only(left: 10,right: 10,top: 10),
height:
1
25
,
height:
1
50
,
child:
Row
(
child:
Row
(
children:
[
children:
[
///左侧
///左侧
...
@@ -29,6 +29,8 @@ class BuildBook extends StatelessWidget {
...
@@ -29,6 +29,8 @@ class BuildBook extends StatelessWidget {
children:
[
children:
[
CustomCard
(
CustomCard
(
url:
model
.
img
??
''
,
url:
model
.
img
??
''
,
height:
110
.
w
,
width:
100
.
w
,
)
)
],
],
),
),
...
@@ -45,17 +47,17 @@ class BuildBook extends StatelessWidget {
...
@@ -45,17 +47,17 @@ class BuildBook extends StatelessWidget {
Column
(
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
model
.
bookName
??
''
,
style:
TextStyle
(
fontSize:
1
6
.
w
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c3
),
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,),
Text
(
model
.
bookName
??
''
,
style:
TextStyle
(
fontSize:
1
7
.
w
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c3
),
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,),
SizedBox
(
height:
5
.
w
,),
SizedBox
(
height:
5
.
w
,),
Text
(
model
.
authors
??
''
,
style:
TextStyle
(
fontSize:
1
3
.
w
,
fontWeight:
FontWeight
.
w400
,
color:
Colours
.
c6
)),
Text
(
model
.
authors
??
''
,
style:
TextStyle
(
fontSize:
1
4
.
w
,
fontWeight:
FontWeight
.
w400
,
color:
Colours
.
c6
)),
],
],
),
),
Row
(
Row
(
children:
[
children:
[
Text
(
'¥
${model.vipPrice}
'
,
style:
TextStyle
(
fontSize:
1
4
.
w
,
fontWeight:
FontWeight
.
w500
,
color:
AppTheme
.
primary
)),
Text
(
'¥
${model.vipPrice}
'
,
style:
TextStyle
(
fontSize:
1
5
.
w
,
fontWeight:
FontWeight
.
w500
,
color:
AppTheme
.
primary
)),
Gaps
.
hGaps10
,
Gaps
.
hGaps10
,
Text
(
'¥
${model.price}
'
,
style:
TextStyle
(
Text
(
'¥
${model.price}
'
,
style:
TextStyle
(
fontSize:
1
2
.
w
,
color:
Colours
.
c9
,
fontSize:
1
3
.
w
,
color:
Colours
.
c9
,
decoration:
TextDecoration
.
lineThrough
,
decoration:
TextDecoration
.
lineThrough
,
decorationColor:
Colours
.
c9
,
// 可选,指定删除线的颜色
decorationColor:
Colours
.
c9
,
// 可选,指定删除线的颜色
decorationThickness:
1
decorationThickness:
1
...
...
lib/pages/book_detail/widgets/study.dart
浏览文件 @
8a35a394
...
@@ -27,8 +27,8 @@ class _BuildStudyState extends State<BuildStudy> {
...
@@ -27,8 +27,8 @@ class _BuildStudyState extends State<BuildStudy> {
Row
(
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Text
(
widget
.
model
.
rating
??
''
,
style:
TextStyle
(
fontSize:
1
6
.
w
,
height:
1.5
,
fontWeight:
Fonts
.
medium
,
color:
AppTheme
.
primary
)),
Text
(
widget
.
model
.
rating
??
''
,
style:
TextStyle
(
fontSize:
1
8
.
w
,
height:
1.5
,
fontWeight:
Fonts
.
medium
,
color:
AppTheme
.
primary
)),
Text
(
'/5.0'
,
style:
TextStyle
(
fontSize:
1
3
.
w
,
height:
1.5
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c9
),)
Text
(
'/5.0'
,
style:
TextStyle
(
fontSize:
1
5
.
w
,
height:
1.5
,
fontWeight:
Fonts
.
medium
,
color:
Colours
.
c9
),)
],
],
),
),
AbsorbPointer
(
AbsorbPointer
(
...
@@ -55,7 +55,7 @@ class _BuildStudyState extends State<BuildStudy> {
...
@@ -55,7 +55,7 @@ class _BuildStudyState extends State<BuildStudy> {
children:
[
children:
[
TextSpan
(
TextSpan
(
text:
widget
.
model
.
readNum
.
toString
(),
text:
widget
.
model
.
readNum
.
toString
(),
style:
TextStyle
(
fontSize:
1
6
.
w
,
color:
Colours
.
c3
,
fontWeight:
Fonts
.
medium
,
height:
1.3
)
style:
TextStyle
(
fontSize:
1
8
.
w
,
color:
Colours
.
c3
,
fontWeight:
Fonts
.
medium
,
height:
1.3
)
),
),
// TextSpan(
// TextSpan(
// text: '万',
// text: '万',
...
...
lib/pages/book_info/view.dart
浏览文件 @
8a35a394
...
@@ -12,6 +12,7 @@ class BookInfoPage extends StatelessWidget {
...
@@ -12,6 +12,7 @@ class BookInfoPage extends StatelessWidget {
return
Container
(
return
Container
(
color:
Colors
.
white
,
color:
Colors
.
white
,
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
.
w
,
vertical:
18
.
w
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
15
.
w
,
vertical:
18
.
w
),
child:
SingleChildScrollView
(
child:
Column
(
child:
Column
(
children:
[
children:
[
// 评分容器
// 评分容器
...
@@ -112,12 +113,12 @@ class BookInfoPage extends StatelessWidget {
...
@@ -112,12 +113,12 @@ class BookInfoPage extends StatelessWidget {
// color: Colors.cyan,
// color: Colors.cyan,
alignment:
Alignment
.
centerRight
,
alignment:
Alignment
.
centerRight
,
width:
50
,
width:
50
,
child:
Text
(
item
[
'name'
].
toString
(),
style:
const
TextStyle
(
fontSize:
11
,
height:
2.1
,
color:
Colours
.
c3
),),
child:
Text
(
item
[
'name'
].
toString
(),
style:
const
TextStyle
(
fontSize:
15
,
height:
2.1
,
color:
Colours
.
c3
),),
),
),
Gaps
.
hGaps20
,
Gaps
.
hGaps20
,
Container
(
Container
(
alignment:
Alignment
.
centerLeft
,
alignment:
Alignment
.
centerLeft
,
child:
Text
(
item
[
'value'
].
toString
(),
style:
const
TextStyle
(
fontSize:
11
,
height:
2.1
,
color:
Colours
.
c9
),
textAlign:
TextAlign
.
end
,),
child:
Text
(
item
[
'value'
].
toString
(),
style:
const
TextStyle
(
fontSize:
15
,
height:
2.1
,
color:
Colours
.
c9
),
textAlign:
TextAlign
.
end
,),
),
),
],
],
);
);
...
@@ -125,6 +126,7 @@ class BookInfoPage extends StatelessWidget {
...
@@ -125,6 +126,7 @@ class BookInfoPage extends StatelessWidget {
)
)
],
],
),
),
),
);
);
}
}
...
...
lib/pages/course/widgets/book.dart
浏览文件 @
8a35a394
...
@@ -41,7 +41,8 @@ class Book extends StatelessWidget {
...
@@ -41,7 +41,8 @@ class Book extends StatelessWidget {
child:
Column
(
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
crossAxisAlignment:
CrossAxisAlignment
.
start
,
children:
[
children:
[
Text
(
model
.
bookName
??
''
,
style:
TextStyle
(
fontSize:
13
.
w
,
height:
1.5
,
color:
Colours
.
c3
),
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,),
Text
(
model
.
bookName
??
''
,
style:
TextStyle
(
fontSize:
15
.
w
,
color:
Colours
.
c3
),
maxLines:
1
,
overflow:
TextOverflow
.
ellipsis
,),
SizedBox
(
height:
6
.
w
,),
Text
(
model
.
authors
??
''
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.3
,
color:
Colours
.
c6
,),
textAlign:
TextAlign
.
left
,),
Text
(
model
.
authors
??
''
,
style:
TextStyle
(
fontSize:
12
.
w
,
height:
1.3
,
color:
Colours
.
c6
,),
textAlign:
TextAlign
.
left
,),
],
],
),
),
...
@@ -55,7 +56,7 @@ class Book extends StatelessWidget {
...
@@ -55,7 +56,7 @@ class Book extends StatelessWidget {
padding:
EdgeInsets
.
symmetric
(
horizontal:
3.5
.
w
),
padding:
EdgeInsets
.
symmetric
(
horizontal:
3.5
.
w
),
child:
Text
(
model
.
typeName
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.3
,
color:
model
.
type
==
0
||
model
.
type
==
1
?
Colours
.
c9
:
AppTheme
.
primary
),),
child:
Text
(
model
.
typeName
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.3
,
color:
model
.
type
==
0
||
model
.
type
==
1
?
Colours
.
c9
:
AppTheme
.
primary
),),
),
),
model
.
type
==
2
?
Text
(
'继续学习'
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.3
,
color:
AppTheme
.
primary
,
fontWeight:
Fonts
.
medium
),):
const
SizedBox
()
model
.
type
==
2
?
Text
(
'继续学习'
,
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.3
,
color:
AppTheme
.
primary
,
fontWeight:
Fonts
.
boldSemi
),):
const
SizedBox
()
],
],
)
)
],
],
...
...
lib/pages/library/view.dart
浏览文件 @
8a35a394
...
@@ -18,7 +18,7 @@ class _LibraryPageState extends State<LibraryPage> {
...
@@ -18,7 +18,7 @@ class _LibraryPageState extends State<LibraryPage> {
title:
const
Text
(
'图书馆'
),
title:
const
Text
(
'图书馆'
),
actions:
[
actions:
[
IconButton
(
IconButton
(
icon:
const
Icon
(
Icons
.
search_rounded
),
icon:
Image
.
asset
(
'assets/images/search.png'
),
tooltip:
'Open shopping cart'
,
tooltip:
'Open shopping cart'
,
onPressed:
()
{
onPressed:
()
{
context
.
pushNamed
(
Routes
.
search
);
context
.
pushNamed
(
Routes
.
search
);
...
@@ -39,6 +39,7 @@ class _LibraryPageState extends State<LibraryPage> {
...
@@ -39,6 +39,7 @@ class _LibraryPageState extends State<LibraryPage> {
children:
[
children:
[
// _buildTab(controller),
// _buildTab(controller),
Row
(
Row
(
crossAxisAlignment:
CrossAxisAlignment
.
center
,
children:
[
children:
[
Expanded
(
child:
_buildCategory
()),
Expanded
(
child:
_buildCategory
()),
GestureDetector
(
GestureDetector
(
...
@@ -46,19 +47,22 @@ class _LibraryPageState extends State<LibraryPage> {
...
@@ -46,19 +47,22 @@ class _LibraryPageState extends State<LibraryPage> {
controller
.
setShow
(
controller
.
show
);
controller
.
setShow
(
controller
.
show
);
},
},
child:
Container
(
child:
Container
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
10
.
w
),
padding:
EdgeInsets
.
only
(
left:
10
.
w
,
right:
10
.
w
,
top:
3
.
w
),
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
height:
38
.
w
,
height:
38
.
w
,
child:
Row
(
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
center
,
mainAxisAlignment:
MainAxisAlignment
.
center
,
children:
[
children:
[
Container
(
Container
(
width:
1
2
.
w
,
width:
1
5
.
w
,
height:
1
2
.
w
,
height:
1
5
.
w
,
// color: Colors.red,
// color: Colors.red,
alignment:
Alignment
.
center
,
alignment:
Alignment
.
center
,
child:
Image
.
asset
(
child:
Image
.
asset
(
'assets/images/filter.png'
,
'assets/images/filter.png'
,
fit:
BoxFit
.
cover
,
width:
15
.
w
,
height:
15
.
w
,
),
),
),
),
Gaps
.
hGaps5
,
Gaps
.
hGaps5
,
...
...
lib/pages/login/controller.dart
浏览文件 @
8a35a394
...
@@ -89,7 +89,7 @@ class LoginController extends GetxController {
...
@@ -89,7 +89,7 @@ class LoginController extends GetxController {
/// 测试账号
/// 测试账号
if
(
kDebugMode
)
{
if
(
kDebugMode
)
{
phoneInput
.
text
=
'13521054068'
;
phoneInput
.
text
=
'13521054068'
;
passwordInput
.
text
=
'123456'
;
passwordInput
.
text
=
'
zj
123456'
;
}
}
super
.
onInit
();
super
.
onInit
();
}
}
...
...
lib/pages/main/view.dart
浏览文件 @
8a35a394
...
@@ -61,36 +61,60 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver{
...
@@ -61,36 +61,60 @@ class _MainPageState extends State<MainPage> with WidgetsBindingObserver{
BottomNavigationBarItem
(
BottomNavigationBarItem
(
icon:
Image
.
asset
(
icon:
Image
.
asset
(
'assets/images/course.png'
,
'assets/images/course.png'
,
width:
25
,
height:
27.5
,
fit:
BoxFit
.
cover
,
),
),
activeIcon:
Image
.
asset
(
activeIcon:
Image
.
asset
(
'assets/images/course_select.png'
,
'assets/images/course_select.png'
,
width:
25
,
height:
27.5
,
fit:
BoxFit
.
cover
,
),
),
label:
'课程'
,
label:
'课程'
,
),
),
BottomNavigationBarItem
(
BottomNavigationBarItem
(
icon:
Image
.
asset
(
icon:
Image
.
asset
(
'assets/images/library.png'
,
'assets/images/library.png'
,
width:
25
,
height:
27.5
,
fit:
BoxFit
.
cover
,
),
),
activeIcon:
Image
.
asset
(
activeIcon:
Image
.
asset
(
'assets/images/library_select.png'
,
'assets/images/library_select.png'
,
width:
25
,
height:
27.5
,
fit:
BoxFit
.
cover
,
),
),
label:
'图书馆'
,
label:
'图书馆'
,
),
),
BottomNavigationBarItem
(
BottomNavigationBarItem
(
icon:
Image
.
asset
(
icon:
Image
.
asset
(
'assets/images/shujia.png'
,
'assets/images/shujia.png'
,
width:
25
,
height:
27.5
,
fit:
BoxFit
.
cover
,
),
),
activeIcon:
Image
.
asset
(
activeIcon:
Image
.
asset
(
'assets/images/shujia_select.png'
,
'assets/images/shujia_select.png'
,
width:
25
,
height:
27.5
,
fit:
BoxFit
.
cover
,
),
),
label:
'书架'
,
label:
'书架'
,
),
),
BottomNavigationBarItem
(
BottomNavigationBarItem
(
icon:
Image
.
asset
(
icon:
Image
.
asset
(
'assets/images/mine.png'
,
'assets/images/mine.png'
,
width:
25
,
height:
27.5
,
fit:
BoxFit
.
cover
,
),
),
activeIcon:
Image
.
asset
(
activeIcon:
Image
.
asset
(
'assets/images/mine_select.png'
,
'assets/images/mine_select.png'
,
width:
25
,
height:
27.5
,
fit:
BoxFit
.
cover
,
),
),
label:
'我的'
,
label:
'我的'
,
)
)
...
...
lib/pages/user_order_evaluate/view.dart
浏览文件 @
8a35a394
...
@@ -28,21 +28,22 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
...
@@ -28,21 +28,22 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
@override
@override
Widget
build
(
BuildContext
context
)
{
Widget
build
(
BuildContext
context
)
{
return
FutureBuilder
(
future:
myController
.
getOrderInfo
(),
super
.
build
(
context
);
builder:
(
context
,
snapshot
)
{
if
(
snapshot
.
connectionState
==
ConnectionState
.
waiting
)
{
return
Scaffold
(
appBar:
AppBar
(
centerTitle:
true
,
title:
const
Text
(
'订单评价'
),
),);
}
else
{
return
Scaffold
(
return
Scaffold
(
appBar:
AppBar
(
appBar:
AppBar
(
centerTitle:
true
,
centerTitle:
true
,
title:
const
Text
(
'订单评价'
),
title:
const
Text
(
'订单评价'
),
),
),
body:
Column
(
body:
FutureBuilder
(
future:
myController
.
getOrderInfo
(),
builder:
(
context
,
snapshot
)
{
if
(
snapshot
.
connectionState
==
ConnectionState
.
waiting
){
return
Container
(
alignment:
Alignment
.
center
,
child:
const
CircularProgressIndicator
(),
);
// 加载中的指示
}
else
{
return
Column
(
children:
[
children:
[
Expanded
(
Expanded
(
child:
SingleChildScrollView
(
child:
SingleChildScrollView
(
...
@@ -84,65 +85,11 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
...
@@ -84,65 +85,11 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
height:
41
.
w
,
height:
41
.
w
,
)
)
],
],
),
);
);
/*GetBuilder<UserOrderEvaluateController>(
init:
UserOrderEvaluateController(widget.orderNum, widget.orderInfoModel),
builder: (controller) => Scaffold(
appBar: AppBar(
centerTitle: true,
title: const Text('订单评价'),
),
body: Column(
children: [
Expanded(
child: SingleChildScrollView(
child: Column(
children: [
ListView.builder(
physics: const NeverScrollableScrollPhysics(),
shrinkWrap: true,
itemBuilder: (BuildContext context, int index) {
return listItem(
controller.orderInfoModel.bookList![index],
orderEvaluates,controllers,myController);
},
itemCount:
controller.orderInfoModel.bookList?.length,
),
],
),
),
),
SizedBox(
height: 26.w,
),
Container(
margin: EdgeInsets.symmetric(horizontal: 10.w),
child: CustomGradientButton(
text: '提交评价',
isEnabled: controller.enable,
onPressed: () {
for(int i=0;i<orderEvaluates.length;i++){
orderEvaluates[i].comments=controllers[i].text.toString();
}
}
print(jsonEncode(orderEvaluates));
controller.UpOrderEvaluate(jsonEncode(orderEvaluates));
},
},
),
),
),
);
SizedBox(
height: 41.w,
)
],
),
));*/
}
},);
}
}
Widget
listItem
(
BookListModel
bookListModel
,
Widget
listItem
(
BookListModel
bookListModel
,
...
@@ -154,7 +101,6 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
...
@@ -154,7 +101,6 @@ class _UserOrderEvaluatePageState extends State<UserOrderEvaluatePage> with Auto
OrderEvaluate
evaluate
=
OrderEvaluate
(
recordId:
bookListModel
.
recordId
);
OrderEvaluate
evaluate
=
OrderEvaluate
(
recordId:
bookListModel
.
recordId
);
orderEvaluates
.
add
(
evaluate
);
orderEvaluates
.
add
(
evaluate
);
controllers
.
add
(
textFieldController
);
controllers
.
add
(
textFieldController
);
}
else
{
}
else
{
textFieldController
=
controllers
[
indexToUpdate
];
textFieldController
=
controllers
[
indexToUpdate
];
}
}
...
...
lib/utils/validator.dart
浏览文件 @
8a35a394
...
@@ -91,9 +91,9 @@ class ValidatorTool {
...
@@ -91,9 +91,9 @@ class ValidatorTool {
// 密码
// 密码
static
bool
isValidPassword
(
String
value
)
{
static
bool
isValidPassword
(
String
value
)
{
//
RegExp passwordPattern = RegExp(r'^[A-Za-z0-9!@#\$%^&*()_+{}\[\]:;<>,.?~\\/-]{8,12}$');
RegExp
passwordPattern
=
RegExp
(
r'^[A-Za-z0-9!@#\$%^&*()_+{}\[\]:;<>,.?~\\/-]{8,12}$'
);
// RegExp passwordPattern = RegExp(r'^(?=.*[A-Za-z])(?=.*\d)(?=.*[~@#%$*()_+{}\[\]:;<>,.?\\/-])[A-Za-z0-9~@#%$*()_+{}\[\]:;<>,.?\\/-]{8,12}$');
// RegExp passwordPattern = RegExp(r'^(?=.*[A-Za-z])(?=.*\d)(?=.*[~@#%$*()_+{}\[\]:;<>,.?\\/-])[A-Za-z0-9~@#%$*()_+{}\[\]:;<>,.?\\/-]{8,12}$');
RegExp
passwordPattern
=
RegExp
(
r'^\d{6}$'
);
//
RegExp passwordPattern = RegExp(r'^\d{6}$');
return
passwordPattern
.
hasMatch
(
value
);
return
passwordPattern
.
hasMatch
(
value
);
}
}
...
...
lib/widgets/AssetImageIconData.dart
0 → 100644
浏览文件 @
8a35a394
import
'package:flutter/cupertino.dart'
;
class
AssetImageIconData
extends
IconData
{
const
AssetImageIconData
(
int
codePoint
)
:
super
(
codePoint
,
fontFamily:
'AssetImage'
,
fontPackage:
'flutter'
,
);
}
\ No newline at end of file
lib/widgets/index.dart
浏览文件 @
8a35a394
...
@@ -13,6 +13,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
...
@@ -13,6 +13,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import
'package:extended_image/extended_image.dart'
;
import
'package:extended_image/extended_image.dart'
;
import
'../theme.dart'
;
import
'../theme.dart'
;
import
'AssetImageIconData.dart'
;
part
'toast.dart'
;
part
'toast.dart'
;
...
...
lib/widgets/input.dart
浏览文件 @
8a35a394
...
@@ -340,6 +340,7 @@ class CustomInputSearch extends StatelessWidget {
...
@@ -340,6 +340,7 @@ class CustomInputSearch extends StatelessWidget {
const
CustomInputSearch
({
const
CustomInputSearch
({
Key
?
key
,
Key
?
key
,
this
.
iconData
=
Icons
.
search_rounded
,
this
.
iconData
=
Icons
.
search_rounded
,
// this.iconData = AssetImageIconData('0xe001'),
this
.
hintText
,
this
.
hintText
,
this
.
controller
,
this
.
controller
,
this
.
readOnly
=
false
,
this
.
readOnly
=
false
,
...
@@ -368,6 +369,21 @@ class CustomInputSearch extends StatelessWidget {
...
@@ -368,6 +369,21 @@ class CustomInputSearch extends StatelessWidget {
height:
1.2
,
height:
1.2
,
),
),
decoration:
InputDecoration
(
decoration:
InputDecoration
(
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
360
.
w
),
// 设置圆角
),
focusedBorder:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
360.0
),
// 设置圆角
borderSide:
const
BorderSide
(
color:
Colors
.
transparent
,
// 定义边框颜色
),
),
enabledBorder:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
360.0
),
// 设置圆角
borderSide:
const
BorderSide
(
color:
Colors
.
transparent
,
// 定义边框颜色
),
),
fillColor:
Theme
.
of
(
context
).
colorScheme
.
tertiary
,
fillColor:
Theme
.
of
(
context
).
colorScheme
.
tertiary
,
contentPadding:
_padding
.
subtract
(
EdgeInsets
.
symmetric
(
contentPadding:
_padding
.
subtract
(
EdgeInsets
.
symmetric
(
horizontal:
_padding
.
horizontal
/
4
,
horizontal:
_padding
.
horizontal
/
4
,
...
@@ -376,10 +392,10 @@ class CustomInputSearch extends StatelessWidget {
...
@@ -376,10 +392,10 @@ class CustomInputSearch extends StatelessWidget {
padding:
EdgeInsets
.
symmetric
(
padding:
EdgeInsets
.
symmetric
(
horizontal:
_padding
.
horizontal
/
4
,
horizontal:
_padding
.
horizontal
/
4
,
),
),
child:
I
con
(
child:
I
mage
.
asset
(
iconData
,
"assets/images/search.png"
,
size:
24
.
w
,
height:
18
.
w
,
color:
const
Color
(
0xFF858C94
)
,
width:
18
.
w
,
),
),
),
),
hintStyle:
TextStyle
(
hintStyle:
TextStyle
(
...
@@ -389,12 +405,12 @@ class CustomInputSearch extends StatelessWidget {
...
@@ -389,12 +405,12 @@ class CustomInputSearch extends StatelessWidget {
),
),
prefixIconConstraints:
const
BoxConstraints
(),
prefixIconConstraints:
const
BoxConstraints
(),
hintText:
hintText
??
'搜索'
,
hintText:
hintText
??
'搜索'
,
enabledBorder:
inputDecoration
.
enabledBorder
?.
copyWith
(
//
enabledBorder: inputDecoration.enabledBorder?.copyWith(
borderSide:
const
BorderSide
(
color:
Colors
.
transparent
),
//
borderSide: const BorderSide(color: Colors.transparent),
),
//
),
focusedBorder:
inputDecoration
.
enabledBorder
?.
copyWith
(
//
focusedBorder: inputDecoration.enabledBorder?.copyWith(
borderSide:
const
BorderSide
(
color:
Colors
.
transparent
),
//
borderSide: const BorderSide(color: Colors.transparent),
),
//
),
disabledBorder:
inputDecoration
.
enabledBorder
?.
copyWith
(
disabledBorder:
inputDecoration
.
enabledBorder
?.
copyWith
(
borderSide:
const
BorderSide
(
color:
Colors
.
transparent
),
borderSide:
const
BorderSide
(
color:
Colors
.
transparent
),
),
),
...
...
pubspec.lock
浏览文件 @
8a35a394
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论