BufferUsageEvent.fromJson constructor Null safety

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

Implementation

factory BufferUsageEvent.fromJson(Map<String, dynamic> json) {
  return BufferUsageEvent(
    percentFull:
        json.containsKey('percentFull') ? json['percentFull'] as num : null,
    eventCount:
        json.containsKey('eventCount') ? json['eventCount'] as num : null,
    value: json.containsKey('value') ? json['value'] as num : null,
  );
}