CPUCores.fromMap constructor

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

fromMap is the method to convert the map to a class.

Implementation

factory CPUCores.fromMap(Map<String, dynamic> map) {
  return CPUCores(
    name: map['name'] ?? '',
    frequency: map['frequency']?.toDouble() ?? 0.0,
  );
}