Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
ChatGPT
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
关振斌
ChatGPT
Commits
6c89421a
Commit
6c89421a
authored
Apr 07, 2023
by
skeyboy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订阅跳转/tts播放内存泄露问题处理
parent
22908b56
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
8 deletions
+26
-8
lib/package/chat_dash/src/widgets/message_row/default_message_text.dart
...at_dash/src/widgets/message_row/default_message_text.dart
+17
-5
lib/pages/home/controller.dart
lib/pages/home/controller.dart
+8
-0
lib/pages/home/view.dart
lib/pages/home/view.dart
+1
-3
No files found.
lib/package/chat_dash/src/widgets/message_row/default_message_text.dart
View file @
6c89421a
...
...
@@ -409,22 +409,34 @@ class MyStyleSheet extends MarkdownStyleSheet {
class
ChartTTSWave
extends
StatefulWidget
{
String
text
;
ChatMessage
message
;
ChartTTSWave
({
Key
?
key
,
required
this
.
text
,
required
this
.
message
})
:
super
(
key:
key
);
ChartTTSWave
({
Key
?
key
,
required
this
.
text
,
required
this
.
message
})
:
super
(
key:
key
);
@override
State
<
ChartTTSWave
>
createState
()
=>
_ChartTTSWaveState
();
}
class
_ChartTTSWaveState
extends
State
<
ChartTTSWave
>
{
void
stopCallback
()
{
if
(
mounted
)
{
setState
(()
{
widget
.
message
.
isPlaying
=
false
;
});
}
}
@override
void
dispose
()
{
// ChartTTS.tts.messages.remove(widget.message);
super
.
dispose
();
}
@override
Widget
build
(
BuildContext
context
)
{
if
(
widget
.
message
.
text
.
toUpperCase
()
==
"loading"
.
toUpperCase
())
{
return
Container
();
}
widget
.
message
.
stopCallback
=
stopCallback
;
return
GestureDetector
(
onTap:
()
async
{
...
...
lib/pages/home/controller.dart
View file @
6c89421a
...
...
@@ -342,6 +342,14 @@ class HomeController extends GetxController with SingleGetTickerProviderMixin {
}
catch
(
e
)
{}
}
virtualPay
(){
if
(
GetPlatform
.
isAndroid
)
{
Get
.
toNamed
(
AppRoutes
.
AN_PAY_LIST
);
}
else
{
Get
.
toNamed
(
AppRoutes
.
PAY_LIST
);
}
}
share
()
async
{
Get
.
toNamed
(
AppRoutes
.
MY_PAGE
);
// final text =
...
...
lib/pages/home/view.dart
View file @
6c89421a
...
...
@@ -96,9 +96,7 @@ class HomePage extends GetView<HomeController> {
color:
Color
.
fromARGB
(
255
,
95
,
54
,
0
),
fontSize:
16
)),
]),
callback:
()
{
Get
.
toNamed
(
AppRoutes
.
PAY_LIST
);
}),
callback:
()=>
controller
.
virtualPay
()),
),
body:
SizedBox
(
width:
double
.
infinity
,
...
...
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