From 588e898eb0774650873f7b33e350a75b3f139e76 Mon Sep 17 00:00:00 2001 From: CloudWebRTC Date: Wed, 16 Oct 2024 12:59:42 +0800 Subject: [PATCH] fix: fix speaker switching behavior for android. (#604) --- example/lib/widgets/controls.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/example/lib/widgets/controls.dart b/example/lib/widgets/controls.dart index 9adfa8974..801bec0a6 100644 --- a/example/lib/widgets/controls.dart +++ b/example/lib/widgets/controls.dart @@ -312,7 +312,7 @@ class _ControlsWidgetState extends State { else PopupMenuButton( icon: const Icon(Icons.settings_voice), - offset: Offset(0, -90), + offset: const Offset(0, -90), itemBuilder: (BuildContext context) { return [ PopupMenuItem( @@ -355,7 +355,7 @@ class _ControlsWidgetState extends State { icon: const Icon(Icons.mic_off), tooltip: 'un-mute audio', ), - if (!lkPlatformIs(PlatformType.iOS)) + if (!lkPlatformIsMobile()) PopupMenuButton( icon: const Icon(Icons.volume_up), itemBuilder: (BuildContext context) { @@ -393,7 +393,7 @@ class _ControlsWidgetState extends State { ]; }, ), - if (!kIsWeb && lkPlatformIs(PlatformType.iOS)) + if (!kIsWeb && lkPlatformIsMobile()) IconButton( disabledColor: Colors.grey, onPressed: Hardware.instance.canSwitchSpeakerphone