FunctionCoverage.fromJson constructor

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

Implementation

factory FunctionCoverage.fromJson(Map<String, dynamic> json) {
  return FunctionCoverage(
    functionName: json['functionName'] as String,
    ranges: (json['ranges'] as List)
        .map((e) => CoverageRange.fromJson(e as Map<String, dynamic>))
        .toList(),
    isBlockCoverage: json['isBlockCoverage'] as bool? ?? false,
  );
}