DeviceInfo.fromMap constructor

DeviceInfo.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory DeviceInfo.fromMap(Map<String, dynamic> map) {
  return DeviceInfo(
    deviceModel: map['deviceModel'] as String,
    deviceManufacturer: map['deviceManufacturer'] as String,
    chipset: map['chipset'] as String,
    androidVersion: map['androidVersion'] as int,
    hasNpu: map['hasNpu'] as bool,
    hasGpu: map['hasGpu'] as bool,
    hasCpu: map['hasCpu'] as bool,
    supportedPlugins:
        (map['supportedPlugins'] as List<dynamic>).cast<String>(),
    performanceLevel: map['performanceLevel'] as String,
  );
}