CPUCores.fromMap constructor
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,
);
}