isScreenSharingSupported static method
Verifica si el compartir pantalla está soportado
Implementation
static Future<bool> isScreenSharingSupported() async {
try {
// Intentar llamar al método con timeout
final result = await _channel.invokeMethod('isSupported').timeout(
const Duration(seconds: 5),
onTimeout: () {
return false;
},
);
// Asegurar que el resultado sea boolean
final bool supported = result == true || result == 1 || result == 'true';
return supported;
} catch (e) {
// En caso de error, asumir que está soportado en iOS 15+
if (Platform.isIOS) {
return true;
}
return false;
}
}