switch function

dynamic switch(
  1. dynamic
)

Implementation

final libfhel = switch (Platform.operatingSystem) {
  "windows" => "$_libraryName.dll",
  "linux" || "android" => "lib$_libraryName.so",
  "macos" => "lib$_libraryName.dylib",
  _ => throw UnsupportedError(
      "Platform ${Platform.operatingSystem} not supported",
    )
}