getDeviceInfo method

  1. @override
Future<DeviceInfo?> getDeviceInfo()
override

Implementation

@override
Future<DeviceInfo?> getDeviceInfo() async {
  Map<dynamic, dynamic>? deviceInfoData;
  try {
    deviceInfoData = await methodChannel.invokeMethod<Map>('getDeviceInfo');
  } on PlatformException {
    rethrow;
  }
  return null != deviceInfoData
      ? SysInfoConversions.convertMapToDeviceInfo(
          deviceInfoData.cast<String, dynamic>())
      : null;
}