Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qmsd-flutter-user-feedback
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PublicSource
qmsd-flutter-user-feedback
Commits
9e1d76bd
Commit
9e1d76bd
authored
Apr 10, 2023
by
tongzifang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
await upimg
parent
c9324d97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
user_feedback_page.dart
lib/user_feedback_page.dart
+11
-3
No files found.
lib/user_feedback_page.dart
View file @
9e1d76bd
...
...
@@ -14,6 +14,8 @@ import 'package:qmsd_flutter_user_feedback/config/user_feedback_imgs.dart';
import
'package:qmsd_flutter_user_feedback/request/user_feedback_client.dart'
;
import
'package:photo_manager/photo_manager.dart'
;
import
'config/user_feedback_strings.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:flutter_easyloading/flutter_easyloading.dart'
;
class
UserFeedBackPage
extends
StatefulWidget
{
const
UserFeedBackPage
({
Key
?
key
})
:
super
(
key:
key
);
...
...
@@ -396,6 +398,8 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
}
subFeedBack
()
async
{
EasyLoading
.
show
(
status:
'loading...'
);
bool
?
subStatus
=
false
;
try
{
if
(
_controller
.
text
.
isEmpty
)
{
return
QmToast
.
toast
(
UserFeedBackString
.
feedback_content_none
);
...
...
@@ -403,18 +407,22 @@ class _UserFeedBackPageState extends State<UserFeedBackPage> {
List
<
String
>
urls
=
[];
if
(
imgFeed
.
isNotEmpty
)
{
for
(
var
element
in
imgFeed
)
{
_uploadImg
(
element
).
then
((
value
)
=>
urls
.
add
(
value
));
await
_uploadImg
(
element
).
then
((
value
)
=>
urls
.
add
(
value
));
}
}
BaseEntity
model
=
await
UserFeedbackClient
()
.
subFeedBack
(
_feedType
,
_controller
.
text
,
urls
);
if
(
model
.
status
==
true
)
{
subStatus
=
model
.
status
;
if
(
subStatus
==
true
)
{
QmToast
.
toast
(
"提交成功!"
);
}
else
{
QmToast
.
toast
(
"提交失败!"
);
}
}
catch
(
e
)
{
print
(
e
);
}
finally
{}
}
finally
{
EasyLoading
.
dismiss
();
if
(
subStatus
==
true
)
BoostNavigator
.
instance
.
pop
({
"res"
:
true
});
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment