From 4c6129a748d4ed7ee8726fb9f5ef27a212c19958 Mon Sep 17 00:00:00 2001 From: cloudwebrtc Date: Wed, 16 Oct 2024 12:53:13 +0800 Subject: [PATCH] fix: fix speaker switching behavior for android. --- 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 9adfa897..801bec0a 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