Result.fromJson constructor

Result.fromJson(
  1. Map<String, Object?> json
)

Implementation

Result.fromJson(Map<String, Object?> json)
  : context = ((v) => v != null
        ? SearchResultsEventContext.fromJson(v as Map<String, Object?>)
        : null)(json['context']),
    rank = ((v) => v != null ? (v as num).toDouble() : null)(json['rank']),
    result = ((v) => v != null
        ? MatrixEvent.fromJson(v as Map<String, Object?>)
        : null)(json['result']);