HighlightModel.fromJson constructor

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

Implementation

factory HighlightModel.fromJson(Map<String, dynamic> json) => HighlightModel(
      id: json['id'],
      bookId: json['bookId'],
      chapterIndex: json['chapterIndex'],
      paragraphKey: json['paragraphKey'] ?? '',
      startIndex: json['startIndex'] ?? 0,
      endIndex: json['endIndex'] ?? 0,
      selectedText: json['selectedText'] ?? '',
      colorValue: json['colorValue'],
    );