isPlatformSupported property
bool
get
isPlatformSupported
Checks if the current platform supports the web server.
Implementation
static bool get isPlatformSupported {
if (kIsWeb) {
return false; // Web platforms don't support ServerSocket.bind
}
// Check if we're on a supported platform
try {
// This will throw on unsupported platforms
return Platform.isAndroid ||
Platform.isIOS ||
Platform.isMacOS ||
Platform.isWindows ||
Platform.isLinux;
} catch (e) {
return false;
}
}