WordMatch.fromJson constructor

WordMatch.fromJson(
  1. Map<String, dynamic> map
)

Parse WordMatch from json.

Implementation

factory WordMatch.fromJson(Map<String, dynamic> map) {
  return WordMatch(
    word: map['word'],
    offset: map['offset'],
    length: map['length'],
    message: map['message'],
    sentence: map['sentence'],
    replacements: List<String>.from(map['suggestions']),
  );
}