patcherServiceProvider top-level property
final
Provides the current PatcherService
instance.
Implementation
final patcherServiceProvider = Provider<PatcherService>((ref) {
switch (kInstallMedium) {
case InstallMedium.aur:
return AurPatcherService();
case InstallMedium.selfCompiled:
return SelfCompiledPatcherService();
case InstallMedium.innoSetup:
final downloadService = ref.watch(downloadServiceProvider);
return InnoSetupPatcherService(downloadService);
case InstallMedium.appImage:
return AppImagePatcherService();
case InstallMedium.dmg:
final downloadService = ref.watch(downloadServiceProvider);
return DmgPatcherService(downloadService);
}
});