Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
book-app
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
book-app
Commits
448adb05
提交
448adb05
authored
2月 22, 2024
作者:
maodou
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/test' into test
上级
b0c5b2ee
9240be5f
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
148 行增加
和
65 行删除
+148
-65
global.dart
lib/global.dart
+7
-0
index.dart
lib/models/index.dart
+1
-0
mine.dart
lib/models/mine.dart
+4
-0
msg.dart
lib/models/msg.dart
+12
-3
controller.dart
lib/pages/read_web/controller.dart
+42
-18
view.dart
lib/pages/read_web/view.dart
+4
-2
controller.dart
lib/pages/user_coupon/controller.dart
+14
-14
view.dart
lib/pages/user_coupon/view.dart
+18
-16
item.dart
lib/pages/user_coupon/widgets/item.dart
+6
-6
controller.dart
lib/pages/user_msg/controller.dart
+5
-0
view.dart
lib/pages/user_msg/view.dart
+30
-1
assets_picker.dart
lib/utils/assets_picker.dart
+2
-2
dialog.dart
lib/widgets/dialog.dart
+3
-3
没有找到文件。
lib/global.dart
浏览文件 @
448adb05
...
@@ -2,6 +2,8 @@ import 'package:flutter/cupertino.dart';
...
@@ -2,6 +2,8 @@ import 'package:flutter/cupertino.dart';
import
'package:flutter/services.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_book/services/index.dart'
;
import
'package:flutter_book/services/index.dart'
;
import
'package:flutter_book/store/index.dart'
;
import
'package:flutter_book/store/index.dart'
;
import
'package:flutter_book/utils/index.dart'
;
import
'package:flutter_inappwebview/flutter_inappwebview.dart'
;
import
'package:get/get.dart'
;
import
'package:get/get.dart'
;
class
Global
{
class
Global
{
static
Future
<
void
>
init
()
async
{
static
Future
<
void
>
init
()
async
{
...
@@ -9,6 +11,11 @@ class Global {
...
@@ -9,6 +11,11 @@ class Global {
WidgetsFlutterBinding
.
ensureInitialized
();
WidgetsFlutterBinding
.
ensureInitialized
();
// 设置应用程序的首选屏幕方向
// 设置应用程序的首选屏幕方向
await
SystemChrome
.
setPreferredOrientations
([
DeviceOrientation
.
portraitUp
]);
await
SystemChrome
.
setPreferredOrientations
([
DeviceOrientation
.
portraitUp
]);
// String documentRoot = await Tools.getDirectory();
// final InAppLocalhostServer localhostServer =
// InAppLocalhostServer(documentRoot: '$documentRoot/',shared: true);
// await localhostServer.start();
// print('本地服务器已成功启动,根目录为: $documentRoot');
await
Future
.
wait
([
await
Future
.
wait
([
// 配置存储
// 配置存储
...
...
lib/models/index.dart
浏览文件 @
448adb05
...
@@ -2,6 +2,7 @@ library models;
...
@@ -2,6 +2,7 @@ library models;
import
'package:just_audio/just_audio.dart'
as
just_audio
;
import
'package:just_audio/just_audio.dart'
as
just_audio
;
part
'response.dart'
;
part
'response.dart'
;
...
...
lib/models/mine.dart
浏览文件 @
448adb05
...
@@ -88,6 +88,7 @@ class CouponModel {
...
@@ -88,6 +88,7 @@ class CouponModel {
couponName
=
json
[
'coupon_name'
];
couponName
=
json
[
'coupon_name'
];
normPrice
=
json
[
'norm_price'
];
normPrice
=
json
[
'norm_price'
];
reducedPrice
=
json
[
'reduced_price'
];
reducedPrice
=
json
[
'reduced_price'
];
type
=
json
[
'use_status'
];
}
}
num
?
couponRecId
;
num
?
couponRecId
;
...
@@ -107,6 +108,7 @@ class CouponModel {
...
@@ -107,6 +108,7 @@ class CouponModel {
String
?
couponName
,
String
?
couponName
,
num
?
normPrice
,
num
?
normPrice
,
String
?
reducedPrice
,
String
?
reducedPrice
,
num
?
type
,
})
=>
})
=>
CouponModel
(
CouponModel
(
couponRecId:
couponRecId
??
this
.
couponRecId
,
couponRecId:
couponRecId
??
this
.
couponRecId
,
...
@@ -116,6 +118,7 @@ class CouponModel {
...
@@ -116,6 +118,7 @@ class CouponModel {
couponName:
couponName
??
this
.
couponName
,
couponName:
couponName
??
this
.
couponName
,
normPrice:
normPrice
??
this
.
normPrice
,
normPrice:
normPrice
??
this
.
normPrice
,
reducedPrice:
reducedPrice
??
this
.
reducedPrice
,
reducedPrice:
reducedPrice
??
this
.
reducedPrice
,
type:
type
??
this
.
type
);
);
Map
<
String
,
dynamic
>
toJson
()
{
Map
<
String
,
dynamic
>
toJson
()
{
...
@@ -127,6 +130,7 @@ class CouponModel {
...
@@ -127,6 +130,7 @@ class CouponModel {
map
[
'coupon_name'
]
=
couponName
;
map
[
'coupon_name'
]
=
couponName
;
map
[
'norm_price'
]
=
normPrice
;
map
[
'norm_price'
]
=
normPrice
;
map
[
'reduced_price'
]
=
reducedPrice
;
map
[
'reduced_price'
]
=
reducedPrice
;
map
[
'use_status'
]
=
type
;
return
map
;
return
map
;
}
}
}
}
...
...
lib/models/msg.dart
浏览文件 @
448adb05
...
@@ -69,23 +69,32 @@ class MsgModel {
...
@@ -69,23 +69,32 @@ class MsgModel {
class
UrlIdModel
{
class
UrlIdModel
{
UrlIdModel
({
UrlIdModel
({
this
.
bookId
,
this
.
bookId
,
this
.
chapterId
,});
this
.
chapterId
,
this
.
orderNum
});
UrlIdModel
.
fromJson
(
dynamic
json
)
{
UrlIdModel
.
fromJson
(
dynamic
json
)
{
bookId
=
json
[
'book_id'
];
bookId
=
json
[
'book_id'
];
chapterId
=
json
[
'chapter_id'
];
chapterId
=
json
[
'chapter_id'
];
orderNum
=
json
[
'ordersnum'
];
}
}
num
?
bookId
;
num
?
bookId
;
num
?
chapterId
;
num
?
chapterId
;
UrlIdModel
copyWith
({
num
?
bookId
,
String
?
orderNum
;
UrlIdModel
copyWith
({
num
?
bookId
,
num
?
chapterId
,
num
?
chapterId
,
})
=>
UrlIdModel
(
bookId:
bookId
??
this
.
bookId
,
String
?
orderNum
,
})
=>
UrlIdModel
(
bookId:
bookId
??
this
.
bookId
,
chapterId:
chapterId
??
this
.
chapterId
,
chapterId:
chapterId
??
this
.
chapterId
,
orderNum:
orderNum
??
this
.
orderNum
);
);
Map
<
String
,
dynamic
>
toJson
()
{
Map
<
String
,
dynamic
>
toJson
()
{
final
map
=
<
String
,
dynamic
>{};
final
map
=
<
String
,
dynamic
>{};
map
[
'book_id'
]
=
bookId
;
map
[
'book_id'
]
=
bookId
;
map
[
'chapter_id'
]
=
chapterId
;
map
[
'chapter_id'
]
=
chapterId
;
map
[
'ordersnum'
]
=
orderNum
;
return
map
;
return
map
;
}
}
...
...
lib/pages/read_web/controller.dart
浏览文件 @
448adb05
...
@@ -52,8 +52,10 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
...
@@ -52,8 +52,10 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
// 录音开始
// 录音开始
bool
startRecording
=
false
;
bool
startRecording
=
false
;
// 是否存在离线文件
// 是否存在离线文件
bool
isExistFile
=
false
;
bool
existDownFile
=
false
;
// 网络状态
bool
netStatus
=
false
;
///------------------------------------------ 页面 生命周期--------------------------------------------------------
///------------------------------------------ 页面 生命周期--------------------------------------------------------
@override
@override
...
@@ -69,20 +71,20 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
...
@@ -69,20 +71,20 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
// 上报开始阅读时间
// 上报开始阅读时间
_addReadTime
(
type:
'open'
);
_addReadTime
(
type:
'open'
);
_getChapters
();
_getChapters
();
final
netStatus
=
await
Tools
.
checkCurrentNetStatus
();
netStatus
=
await
Tools
.
checkCurrentNetStatus
();
// 判断是否有离线文件 如果有使用离线阅读
//
//
判断是否有离线文件 如果有使用离线阅读
final
exist
=
await
_isExistFile
(
bookId
);
//
final exist = await _isExistFile(bookId);
// 没有网并且有离线文件 离线阅读
//
//
没有网并且有离线文件 离线阅读
if
(
netStatus
&&
exist
){
// String path = await _getDirectory();
// webViewController.loadUrl(urlRequest: Uri.parse(urlRequest))
// String finalPath = '$path/174/0-318.html';
}
// final content = await readHtmlFileContent(finalPath);
// Console.log('原始内容-----------------$content');
String
path
=
await
_getDirectory
(
);
// String htmlStr = EncryptUtil.aesDecrypt(content!
);
String
finalPath
=
'
$path
/175/333.html'
;
// Console.log('解密-----------------$htmlStr')
;
final
content
=
await
readHtmlFileContent
(
finalPath
);
// if (netStatus && exist){
//
EncryptUtil.aesDecrypt(content
);
//
Console.log('-------------使用本地文件-------------------'
);
Console
.
log
(
'原始内容-----------------
$content
'
);
// webViewController.loadData(data: htmlStr??'
');
Console
.
log
(
'解密-----------------
${EncryptUtil.aesDecrypt(content!)}
'
);
// }
super
.
onReady
();
super
.
onReady
();
...
@@ -112,6 +114,25 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
...
@@ -112,6 +114,25 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
update
();
update
();
}
}
// 读取那个章节
void
readLocalHtml
(
String
chapterId
)
async
{
// 判断是否有离线文件 如果有使用离线阅读
final
exist
=
await
_isExistFile
(
bookId
);
if
(
netStatus
&&
exist
){
// 没有网并且有离线文件 离线阅读
String
path
=
await
_getDirectory
();
String
finalPath
=
'
$path
/
$bookId
/0-318.html'
;
final
content
=
await
readHtmlFileContent
(
finalPath
);
Console
.
log
(
'原始内容-----------------
$content
'
);
String
htmlStr
=
EncryptUtil
.
aesDecrypt
(
content
!);
Console
.
log
(
'解密-----------------
$htmlStr
'
);
Console
.
log
(
'-------------使用本地文件-------------------'
);
webViewController
.
loadData
(
data:
htmlStr
??
''
);
}
}
// 初始化录音组件
// 初始化录音组件
Future
<
void
>
openTheRecorder
()
async
{
Future
<
void
>
openTheRecorder
()
async
{
// 获取权限
// 获取权限
...
@@ -460,12 +481,15 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
...
@@ -460,12 +481,15 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
bool
directoryExists
=
await
directory
.
exists
();
bool
directoryExists
=
await
directory
.
exists
();
if
(
directoryExists
)
{
if
(
directoryExists
)
{
print
(
'存在名为 "
$bookId
" 的文件夹'
);
print
(
'存在名为 "
$bookId
" 的文件夹'
);
return
await
Directory
(
'
${directory.path}
/
$bookId
'
).
exists
();
existDownFile
=
await
Directory
(
'
${directory.path}
/
$bookId
'
).
exists
();
}
}
isExistFile
=
directoryExists
;
else
{
print
(
'不存在名为 "
$bookId
" 的文件夹'
);
print
(
'不存在名为 "
$bookId
" 的文件夹'
);
return
false
;
existDownFile
=
false
;
}
update
();
return
existDownFile
;
}
}
...
...
lib/pages/read_web/view.dart
浏览文件 @
448adb05
...
@@ -42,7 +42,7 @@ class _ReadPageState extends State<ReadPage> {
...
@@ -42,7 +42,7 @@ class _ReadPageState extends State<ReadPage> {
readController
.
getBookDown
();
readController
.
getBookDown
();
},
},
child:
Text
(
child:
Text
(
readController
.
isExistFil
e
?
''
:
'离线阅读'
,
readController
.
existDownFile
==
tru
e
?
''
:
'离线阅读'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
14
.
w
,
color:
Colours
.
c3
),
fontSize:
14
.
w
,
color:
Colours
.
c3
),
))
))
...
@@ -64,7 +64,8 @@ class _ReadPageState extends State<ReadPage> {
...
@@ -64,7 +64,8 @@ class _ReadPageState extends State<ReadPage> {
children:
[
children:
[
InAppWebView
(
InAppWebView
(
initialUrlRequest:
URLRequest
(
initialUrlRequest:
URLRequest
(
url:
Uri
.
parse
(
'http://150.158.138.40:9200/read.html'
),
// url: Uri.parse('http://150.158.138.40:9200/read.html'),
url:
Uri
.
parse
(
"/storage/emulated/0/Android/data/com.zijin.book.flutter_book/files/174/7-325.html"
),
),
),
contextMenu:
ContextMenu
(
contextMenu:
ContextMenu
(
options:
ContextMenuOptions
(
hideDefaultSystemContextMenuItems:
true
),
options:
ContextMenuOptions
(
hideDefaultSystemContextMenuItems:
true
),
...
@@ -301,6 +302,7 @@ class _ReadPageState extends State<ReadPage> {
...
@@ -301,6 +302,7 @@ class _ReadPageState extends State<ReadPage> {
return
const
SizedBox
();
return
const
SizedBox
();
}
}
}
}
...
...
lib/pages/user_coupon/controller.dart
浏览文件 @
448adb05
...
@@ -10,7 +10,7 @@ class UserCouponController extends GetxController {
...
@@ -10,7 +10,7 @@ class UserCouponController extends GetxController {
// 优惠券
// 优惠券
List
<
CouponModel
>
coupons
=
[];
List
<
CouponModel
>
coupons
=
[];
late
int
type
=
2
;
// late int type = 0
;
final
int
_limit
=
10
;
final
int
_limit
=
10
;
int
_page
=
1
;
int
_page
=
1
;
...
@@ -23,13 +23,13 @@ class UserCouponController extends GetxController {
...
@@ -23,13 +23,13 @@ class UserCouponController extends GetxController {
}
}
//
void
getOverCoupons
()
{
//
void getOverCoupons() {
_noMore
=
true
;
//
_noMore = true;
_page
=
1
;
//
_page = 1;
type
=
1
;
// type = 0
;
_getCoupon
();
//
_getCoupon();
}
//
}
/// 获取我的优惠券
/// 获取我的优惠券
Future
<
void
>
_getCoupon
([
bool
isRefresh
=
false
])
async
{
Future
<
void
>
_getCoupon
([
bool
isRefresh
=
false
])
async
{
...
@@ -38,15 +38,15 @@ class UserCouponController extends GetxController {
...
@@ -38,15 +38,15 @@ class UserCouponController extends GetxController {
final
result
=
await
MineAPI
.
coupon
(
final
result
=
await
MineAPI
.
coupon
(
page:
_page
,
page:
_page
,
limit:
_limit
,
limit:
_limit
,
type:
type
,
type:
0
,
);
);
// 如果是刷新 清理数据
// 如果是刷新 清理数据
if
(
isRefresh
)
coupons
.
clear
();
if
(
isRefresh
)
coupons
.
clear
();
for
(
CouponModel
model
in
result
){
//
for(CouponModel model in result){
model
.
type
=
type
;
//
model.type=type;
coupons
.
add
(
model
);
//
coupons.add(model);
}
//
}
//
coupons.addAll(result);
coupons
.
addAll
(
result
);
_page
++;
_page
++;
_noMore
=
result
.
length
<
_limit
;
_noMore
=
result
.
length
<
_limit
;
update
();
update
();
...
...
lib/pages/user_coupon/view.dart
浏览文件 @
448adb05
...
@@ -29,24 +29,26 @@ class _UserCouponPageState extends State<UserCouponPage> {
...
@@ -29,24 +29,26 @@ class _UserCouponPageState extends State<UserCouponPage> {
onLoading:
controller
.
onLoading
,
onLoading:
controller
.
onLoading
,
child:
ListView
.
builder
(
child:
ListView
.
builder
(
itemBuilder:
(
BuildContext
context
,
int
index
){
itemBuilder:
(
BuildContext
context
,
int
index
){
if
(
index
==
controller
.
coupons
.
length
){
return
GestureDetector
(
onTap:
(){
controller
.
getOverCoupons
();
},
child:
Container
(
alignment:
Alignment
.
center
,
height:
40
.
w
,
// color: Colors.cyan,
child:
Text
(
'过期优惠券'
),
),
);
}
else
{
return
BuildItem
(
model:
controller
.
coupons
[
index
],);
return
BuildItem
(
model:
controller
.
coupons
[
index
],);
}
// if (index == controller.coupons.length){
// return GestureDetector(
// onTap: (){
// // controller.getOverCoupons();
// },
// child: Container(
// alignment: Alignment.center,
// height: 40.w,
// // color: Colors.cyan,
// child: Text('过期优惠券'),
// ),
// );
// }
// else {
// return BuildItem(model: controller.coupons[index],);
// }
},
},
itemCount:
controller
.
coupons
.
length
+
1
,
// itemCount: controller.coupons.length +1,
itemCount:
controller
.
coupons
.
length
,
),
),
),
),
),
),
...
...
lib/pages/user_coupon/widgets/item.dart
浏览文件 @
448adb05
...
@@ -14,7 +14,7 @@ class BuildItem extends StatelessWidget {
...
@@ -14,7 +14,7 @@ class BuildItem extends StatelessWidget {
child:
Stack
(
child:
Stack
(
children:
[
children:
[
Image
.
asset
(
Image
.
asset
(
model
.
type
==
2
model
.
type
==
0
?
'assets/images/coupon_bg.png'
?
'assets/images/coupon_bg.png'
:
'assets/images/coupon_bg_expired.png'
,
:
'assets/images/coupon_bg_expired.png'
,
fit:
BoxFit
.
contain
,
fit:
BoxFit
.
contain
,
...
@@ -44,7 +44,7 @@ class BuildItem extends StatelessWidget {
...
@@ -44,7 +44,7 @@ class BuildItem extends StatelessWidget {
fontSize:
15
.
w
,
fontSize:
15
.
w
,
fontWeight:
Fonts
.
boldSemi
,
fontWeight:
Fonts
.
boldSemi
,
height:
1.5
,
height:
1.5
,
color:
model
.
type
==
2
color:
model
.
type
==
0
?
Colors
.
white
?
Colors
.
white
:
Colours
.
cC8
)),
:
Colours
.
cC8
)),
TextSpan
(
TextSpan
(
...
@@ -53,7 +53,7 @@ class BuildItem extends StatelessWidget {
...
@@ -53,7 +53,7 @@ class BuildItem extends StatelessWidget {
fontSize:
40
.
w
,
fontSize:
40
.
w
,
fontWeight:
Fonts
.
boldSemi
,
fontWeight:
Fonts
.
boldSemi
,
height:
1.5
,
height:
1.5
,
color:
model
.
type
==
2
color:
model
.
type
==
0
?
Colors
.
white
?
Colors
.
white
:
Colours
.
cC8
)),
:
Colours
.
cC8
)),
]),
]),
...
@@ -61,7 +61,7 @@ class BuildItem extends StatelessWidget {
...
@@ -61,7 +61,7 @@ class BuildItem extends StatelessWidget {
Text
(
Text
(
'满
${model.normPrice}
可用'
,
'满
${model.normPrice}
可用'
,
style:
TextStyle
(
style:
TextStyle
(
fontSize:
11
.
w
,
height:
1.5
,
color:
model
.
type
==
2
fontSize:
11
.
w
,
height:
1.5
,
color:
model
.
type
==
0
?
Colors
.
white
?
Colors
.
white
:
Colours
.
cC8
),
:
Colours
.
cC8
),
)
)
...
@@ -87,7 +87,7 @@ class BuildItem extends StatelessWidget {
...
@@ -87,7 +87,7 @@ class BuildItem extends StatelessWidget {
fontSize:
16
.
w
,
fontSize:
16
.
w
,
fontWeight:
Fonts
.
medium
,
fontWeight:
Fonts
.
medium
,
height:
1.5
,
height:
1.5
,
color:
model
.
type
==
2
color:
model
.
type
==
0
?
Colours
.
c3
?
Colours
.
c3
:
Colours
.
c9
),
:
Colours
.
c9
),
maxLines:
1
,
maxLines:
1
,
...
@@ -116,7 +116,7 @@ class BuildItem extends StatelessWidget {
...
@@ -116,7 +116,7 @@ class BuildItem extends StatelessWidget {
],
],
),
),
),
),
model
.
type
==
2
model
.
type
==
0
?
Stack
(
?
Stack
(
children:
[
children:
[
//TODO 暂时隐藏 立即使用 按钮
//TODO 暂时隐藏 立即使用 按钮
...
...
lib/pages/user_msg/controller.dart
浏览文件 @
448adb05
...
@@ -26,6 +26,11 @@ class MsgController extends GetxController {
...
@@ -26,6 +26,11 @@ class MsgController extends GetxController {
return
result
;
return
result
;
}
}
/// 获取订单详细
Future
<
OrderInfoModel
>
getOrderInfo
(
String
orderNum
)
async
{
return
await
MineAPI
.
getOrderInfo
(
orderNum:
orderNum
);
}
/// 获取课程内图书列表
/// 获取课程内图书列表
Future
<
void
>
_getMsgs
([
bool
isRefresh
=
false
])
async
{
Future
<
void
>
_getMsgs
([
bool
isRefresh
=
false
])
async
{
if
(
isRefresh
)
_page
=
1
;
if
(
isRefresh
)
_page
=
1
;
...
...
lib/pages/user_msg/view.dart
浏览文件 @
448adb05
...
@@ -34,11 +34,40 @@ class MsgPage extends StatelessWidget {
...
@@ -34,11 +34,40 @@ class MsgPage extends StatelessWidget {
controller
.
read
(
model
.
id
.
toString
());
controller
.
read
(
model
.
id
.
toString
());
if
(
model
.
type
==
1
){
if
(
model
.
type
==
1
){
// 1订单支付快要超时(跳转订单详情)
final
result
=
await
context
.
pushNamed
(
Routes
.
order
);
final
result
=
await
context
.
pushNamed
(
Routes
.
order
);
if
(
result
==
true
){
if
(
result
==
true
){
controller
.
onRefresh
();
controller
.
onRefresh
();
}
}
// final orderInfo = await controller.getOrderInfo(model.urlId?.orderNum??'');
// // 待支付
// if (orderInfo.status == 1){
// // 书籍订单
// if (orderInfo.types ==1){
// final result = await context.pushNamed(Routes.orderAwaiting,
// queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
// if (result == true){
// controller.onRefresh();
// }
// }
// // 充值订单
// else {
// final result = await context.pushNamed(Routes.orderCoinAwaiting,
// queryParameters: {'orderNum': model.urlId?.orderNum.toString()});
// if (result == true){
// controller.onRefresh();
// }
// }
//
// }
// // 已支付
// else if (orderInfo.status ==3){
//
// }
// // 已退款
// else if (orderInfo.status == 4){
//
// }
///TODO:
///TODO:
}
else
if
(
model
.
type
==
2
){
}
else
if
(
model
.
type
==
2
){
// 2 购买完成三天未评价(跳转订单列表--已完成)
// 2 购买完成三天未评价(跳转订单列表--已完成)
...
...
lib/utils/assets_picker.dart
浏览文件 @
448adb05
...
@@ -14,7 +14,7 @@ abstract class AssetsPicker {
...
@@ -14,7 +14,7 @@ abstract class AssetsPicker {
if
(
context
.
mounted
)
{
if
(
context
.
mounted
)
{
CustomDialog
.
showAccess
(
CustomDialog
.
showAccess
(
context:
context
,
context:
context
,
content:
const
Text
(
'
Requires access to your photo gallery
'
),
content:
const
Text
(
'
获取相册权限
'
),
);
);
}
}
return
null
;
return
null
;
...
@@ -36,7 +36,7 @@ abstract class AssetsPicker {
...
@@ -36,7 +36,7 @@ abstract class AssetsPicker {
if
(
context
.
mounted
)
{
if
(
context
.
mounted
)
{
CustomDialog
.
showAccess
(
CustomDialog
.
showAccess
(
context:
context
,
context:
context
,
content:
const
Text
(
'
Requires access to your photo gallery
'
),
content:
const
Text
(
'
获取拍照权限
'
),
);
);
}
}
return
null
;
return
null
;
...
...
lib/widgets/dialog.dart
浏览文件 @
448adb05
...
@@ -48,9 +48,9 @@ class CustomDialog extends StatelessWidget {
...
@@ -48,9 +48,9 @@ class CustomDialog extends StatelessWidget {
await
show
(
await
show
(
context:
context
,
context:
context
,
builder:
(
context
)
=>
content
,
builder:
(
context
)
=>
content
,
title:
const
Text
(
'
Permission
'
),
title:
const
Text
(
'
权限申请
'
),
cancel:
const
Text
(
'
Cancel
'
),
cancel:
const
Text
(
'
取消
'
),
confirm:
const
Text
(
'
Setting
'
),
confirm:
const
Text
(
'
设置
'
),
onCancel:
()
=>
Navigator
.
of
(
context
).
pop
(),
onCancel:
()
=>
Navigator
.
of
(
context
).
pop
(),
onConfirm:
()
=>
Access
.
setting
(),
onConfirm:
()
=>
Access
.
setting
(),
);
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论