feat: cm interface

This commit is contained in:
Kingtous
2023-02-07 16:11:55 +08:00
parent 5e21a81a5c
commit 2943d2d0cc
12 changed files with 143 additions and 44 deletions

View File

@@ -713,19 +713,27 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
() {
switch (widget.ffi.chatModel.voiceCallStatus.value) {
case VoiceCallStatus.waitingForResponse:
return SvgPicture.asset(
"assets/voice_call_waiting.svg",
color: _MenubarTheme.commonColor,
width: Theme.of(context).iconTheme.size ?? 24.0,
height: Theme.of(context).iconTheme.size ?? 24.0,
);
break;
return IconButton(
onPressed: () {
widget.ffi.chatModel.closeVoiceCall(widget.id);
},
icon: SvgPicture.asset(
"assets/voice_call_waiting.svg",
color: Colors.red,
width: Theme.of(context).iconTheme.size ?? 24.0,
height: Theme.of(context).iconTheme.size ?? 24.0,
));
case VoiceCallStatus.connected:
return SvgPicture.asset(
"assets/voice_call.svg",
color: Colors.red,
width: Theme.of(context).iconTheme.size ?? 24.0,
height: Theme.of(context).iconTheme.size ?? 24.0,
return IconButton(
onPressed: () {
widget.ffi.chatModel.closeVoiceCall(widget.id);
},
icon: SvgPicture.asset(
"assets/voice_call.svg",
color: Colors.red,
width: Theme.of(context).iconTheme.size ?? 24.0,
height: Theme.of(context).iconTheme.size ?? 24.0,
),
);
default:
return const Offstage();