Skip to content

Commit 588e898

Browse files
authored
fix: fix speaker switching behavior for android. (#604)
1 parent 519b25b commit 588e898

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

example/lib/widgets/controls.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
312312
else
313313
PopupMenuButton<MediaDevice>(
314314
icon: const Icon(Icons.settings_voice),
315-
offset: Offset(0, -90),
315+
offset: const Offset(0, -90),
316316
itemBuilder: (BuildContext context) {
317317
return [
318318
PopupMenuItem<MediaDevice>(
@@ -355,7 +355,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
355355
icon: const Icon(Icons.mic_off),
356356
tooltip: 'un-mute audio',
357357
),
358-
if (!lkPlatformIs(PlatformType.iOS))
358+
if (!lkPlatformIsMobile())
359359
PopupMenuButton<MediaDevice>(
360360
icon: const Icon(Icons.volume_up),
361361
itemBuilder: (BuildContext context) {
@@ -393,7 +393,7 @@ class _ControlsWidgetState extends State<ControlsWidget> {
393393
];
394394
},
395395
),
396-
if (!kIsWeb && lkPlatformIs(PlatformType.iOS))
396+
if (!kIsWeb && lkPlatformIsMobile())
397397
IconButton(
398398
disabledColor: Colors.grey,
399399
onPressed: Hardware.instance.canSwitchSpeakerphone

0 commit comments

Comments
 (0)