fix part screen voice input and adaption
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 52 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB |
@@ -24,7 +24,7 @@ class _PartScreenState extends State<PartScreen> {
|
|||||||
super.initState();
|
super.initState();
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
final messageService = Provider.of<MessageService>(context, listen: false);
|
final messageService = Provider.of<MessageService>(context, listen: false);
|
||||||
messageService.initializeEmpty();
|
messageService.removeNonListeningMessages();
|
||||||
setState(() {
|
setState(() {
|
||||||
_isInitialized = true;
|
_isInitialized = true;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -381,4 +381,9 @@ class MessageService extends ChangeNotifier {
|
|||||||
_messages.clear();
|
_messages.clear();
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void removeNonListeningMessages() {
|
||||||
|
_messages.removeWhere((message) => message.status != MessageStatus.listening);
|
||||||
|
notifyListeners();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -329,8 +329,8 @@ class _ChatBubbleState extends State<ChatBubble> {
|
|||||||
padding: const EdgeInsets.only(left: 12),
|
padding: const EdgeInsets.only(left: 12),
|
||||||
child: Image.asset(
|
child: Image.asset(
|
||||||
'assets/images/copy.png',
|
'assets/images/copy.png',
|
||||||
width: 24,
|
width: 22,
|
||||||
height: 24
|
height: 22
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -345,9 +345,9 @@ class _ChatBubbleState extends State<ChatBubble> {
|
|||||||
padding: const EdgeInsets.only(left: 12),
|
padding: const EdgeInsets.only(left: 12),
|
||||||
child: _liked
|
child: _liked
|
||||||
? Image.asset('assets/images/liked2.png',
|
? Image.asset('assets/images/liked2.png',
|
||||||
width: 24, height: 24)
|
width: 22, height: 22)
|
||||||
: Image.asset('assets/images/liked1.png',
|
: Image.asset('assets/images/liked1.png',
|
||||||
width: 24, height: 24),
|
width: 22, height: 22),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
InkWell(
|
InkWell(
|
||||||
@@ -361,9 +361,9 @@ class _ChatBubbleState extends State<ChatBubble> {
|
|||||||
padding: const EdgeInsets.only(left: 12),
|
padding: const EdgeInsets.only(left: 12),
|
||||||
child: _disliked
|
child: _disliked
|
||||||
? Image.asset('assets/images/disliked2.png',
|
? Image.asset('assets/images/disliked2.png',
|
||||||
width: 24, height: 24)
|
width: 22, height: 22)
|
||||||
: Image.asset('assets/images/disliked1.png',
|
: Image.asset('assets/images/disliked1.png',
|
||||||
width: 24, height: 24)),
|
width: 22, height: 22)),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user