switch function
dynamic
switch(
- 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",
)
}