getDeviceInfo method

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

Implementation

@override
Future<DevicesInfoModel?> getDeviceInfo() async {
  try {
    final version = await methodChannel.invokeMethod<String>('getInformations');
    return DevicesInfoModel.fromJson(jsonDecode(version!));
  } catch (e) {
    return null;
  }
}