yosemiteyss / flutter_volume_controller

A Flutter plugin to control system volume and listen for volume changes on different platforms.
https://pub.dev/packages/flutter_volume_controller
MIT License
13 stars 7 forks source link

Show/hide iOS system UI without changing volume #60

Closed Albert221 closed 7 months ago

Albert221 commented 7 months ago

Currently the setShowSystemUI method in VolumeController.swift is private and called only in set, raise and lower volume methods. This makes it impossible to enable back the volume system UI without actually showing it from Flutter.

I propose to add an updateShowSystemUI (or other name) method on Flutter side to call the setShowSystemUI method with the newly set FlutterVolumeController.showSystemUI.

Please @yosemiteyss tell me if you'd be able to work on that in a short time period or whether you'd accept PR for that.

Ideally, the FlutterVolumeController.showSystemUI would be a setter/method that calls native said straight away, but this would be a breaking change.

As for the Android side, I see it's not trivial - https://github.com/yosemiteyss/flutter_volume_controller/issues/58#issuecomment-1714949435 - so it could just do nothing there.

yosemiteyss commented 7 months ago

Thanks for reporting the bug. Will update it the next few days.

yosemiteyss commented 7 months ago

Fixed in 1.3.0

Albert221 commented 7 months ago

This was really fast, thank you so much!