ReadSpec.fromJson constructor

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

Create from JSON.

Implementation

factory ReadSpec.fromJson(Map<String, dynamic> json) {
  return ReadSpec(
    targets: (json['targets'] as List<dynamic>)
        .map((e) => e as String)
        .toList(),
    options: json['options'] != null
        ? ReadOptions.fromJson(json['options'] as Map<String, dynamic>)
        : null,
  );
}