getOsInfo method
Implementation
@override
Future<OsInfo> getOsInfo() async {
try {
final Map<dynamic, dynamic>? res = await methodChannel.invokeMethod('getOsInfo');
if (res == null) return const OsInfo();
return OsInfo.fromMap(res.cast<String, dynamic>());
} on PlatformException catch (e) {
throw DeviceInspectorException(_mapErrorCode(e.code), e.message ?? 'Failed to get OS info', cause: e);
} catch (e) {
return const OsInfo();
}
}