Match.fromJson constructor

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

Implementation

factory Match.fromJson(Map<String, dynamic> json) => Match(
      message: json['message'] as String,
      shortMessage: json['shortMessage'] as String,
      replacements: (json['replacements'] as Iterable)
          .map<Replacement>(
            (e) => Replacement.fromJson(e as Map<String, dynamic>),
          )
          .toList(),
      offset: json['offset'] as int,
      length: json['length'] as int,
      context: Context.fromJson(json['context'] as Map<String, dynamic>),
      sentence: json['sentence'] as String,
      type: Type.fromJson(json['type'] as Map<String, dynamic>),
      rule: Rule.fromJson(json['rule'] as Map<String, dynamic>),
      ignoreForIncompleteSentence:
          json['ignoreForIncompleteSentence'] as bool,
      contextForSureMatch: json['contextForSureMatch'] as int,
    );