RoomEventsCriteria.fromJson constructor

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

Implementation

RoomEventsCriteria.fromJson(Map<String, Object?> json)
    : eventContext = ((v) => v != null
          ? IncludeEventContext.fromJson(v as Map<String, Object?>)
          : null)(json['event_context']),
      filter = ((v) => v != null
          ? SearchFilter.fromJson(v as Map<String, Object?>)
          : null)(json['filter']),
      groupings = ((v) => v != null
          ? Groupings.fromJson(v as Map<String, Object?>)
          : null)(json['groupings']),
      includeState =
          ((v) => v != null ? v as bool : null)(json['include_state']),
      keys = ((v) => v != null
          ? (v as List)
              .map((v) => KeyKind.values.fromString(v as String)!)
              .toList()
          : null)(json['keys']),
      orderBy = ((v) => v != null
          ? SearchOrder.values.fromString(v as String)!
          : null)(json['order_by']),
      searchTerm = json['search_term'] as String;