Volume_Flutter
Volume_Flutter copied to clipboard
Migrate to null-safety
Migrate existing code to null-safety
.
Full Description
Since last week, Flutter 2.0 hit stable branch. With 2.0 we've received Dart 2.12 with new sound null safety mechanism. Current volume
package doesn't support null-safety
yet therefore migration is a must.
Example Code Migration will touch most of the code. Key objectives here is to utilise dart migrate so all of the heavy lifting is done. And after that, run the build and fix places, that were fixed incorrectly by the tool.
Platforms Migration will touch all of the platforms.
Research Resources
null-safety
is unavoidable thus sooner or later it must be done.
https://dart.dev/null-safety
Additional This will be a heavy migration therefore careful code review is a must from one or more developers, after everything is done.
Is there any progress on this?
The developer seems to have abandoned the project. There are better alternatives that also support iOS and can hide the volume UI. I would recommend using this one - https://pub.dev/packages/perfect_volume_control or https://pub.dev/packages/volume_controller
I would recommend using this one - https://pub.dev/packages/perfect_volume_control or https://pub.dev/packages/volume_controller
They both can control only device volume, Volume_Flutter could do a lot more:
AudioManager.STREAM_VOICE_CALL -> Controll IN CALL Volume AudioManager.STREAM_SYSTEM -> Controll SYSTEM Volume AudioManager.STREAM_RING -> Controll RINGER Volume AudioManager.STREAM_MUSIC -> Controll MEDIA Volume AudioManager.STREAM_ALARM -> Controll ALARM Volume AudioManager.STREAM_NOTIFICATION -> Controll NOTIFICATION Volume
Any alternatives for controlling STREAM_SYSTEM, STREAM_ALARM?
I would recommend using this one - https://pub.dev/packages/perfect_volume_control or https://pub.dev/packages/volume_controller
They both can control only device volume, Volume_Flutter could do a lot more:
AudioManager.STREAM_VOICE_CALL -> Controll IN CALL Volume AudioManager.STREAM_SYSTEM -> Controll SYSTEM Volume AudioManager.STREAM_RING -> Controll RINGER Volume AudioManager.STREAM_MUSIC -> Controll MEDIA Volume AudioManager.STREAM_ALARM -> Controll ALARM Volume AudioManager.STREAM_NOTIFICATION -> Controll NOTIFICATION Volume
Any alternatives for controlling STREAM_SYSTEM, STREAM_ALARM?
Okay, so I went ahead and tried to make a null-safe version of this package. Remember that iOS is not yet supported and I am not planning to maintain it. Give it a try:
volume:
git:
url: https://github.com/ashishbeck/Volume_Flutter
You can also try this one I created https://pub.dev/packages/real_volume that works for both Android and iOS.