installSoundVolumeView method

Future<bool> installSoundVolumeView()

installSoundVolumeView installs SoundVolumeView in the system

Implementation

Future<bool> installSoundVolumeView() async {
  final isPlatformSupported = platformSupported();
  if( !isPlatformSupported ) return false;

  try {
    await shell.run('winget install --id=NirSoft.SoundVolumeView -e');
    stateController.add(SoundVolumeViewState.installed);
  } catch( error ) {
    stateController.add(SoundVolumeViewState.errorToInstall);
  }

  return true;
}