useMethod method

Future<String> useMethod(
  1. String to
)

Implementation

Future<String> useMethod(String to) async {
  await boot();

  switch (preferredMethod) {
    case 'any':
      return await bestForAny(to: to);
    case 'flatpak':
      return await bestForFlatpak(to: to);
    case 'snap':
      return await bestForSnap(to: to);
    case 'appimage':
      return await bestForAppImage(to: to);
    case 'apt':
      return await bestForApt(to: to);
    case 'brew':
      return await bestForMacOS(to: to);
    case 'choco':
      return await bestForWindows(to: to);
    case 'dnf':
      return await bestForFedora(to: to);
    case 'pacman':
      return await bestForArch(to: to);
    case 'android':
      return await bestForAndroid(to: to);
    case 'zypper':
      return await bestForOpenSUSE(to: to);
    case 'swupd':
      return await bestForClearLinux(to: to);
    default:
      return await findBest(to);
  }
}