DevicePoolCompatibilityResult.fromJson constructor

DevicePoolCompatibilityResult.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory DevicePoolCompatibilityResult.fromJson(Map<String, dynamic> json) {
  return DevicePoolCompatibilityResult(
    compatible: json['compatible'] as bool?,
    device: json['device'] != null
        ? Device.fromJson(json['device'] as Map<String, dynamic>)
        : null,
    incompatibilityMessages: (json['incompatibilityMessages'] as List?)
        ?.whereNotNull()
        .map(
            (e) => IncompatibilityMessage.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}