QueryCondition.fromJson constructor

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

Implementation

factory QueryCondition.fromJson(Map<String, dynamic> json) {
  return QueryCondition(
    lockQueryType: json.valueTo<LockQueryType?, Object?>(
      key: 'lock_query_type',
      parse: (v) => LockQueryType.from(v),
    ),
    denom: json.valueAsString<String?>('denom', acceptCamelCase: true),
    duration: json.valueTo<google_protobuf_duration.Duration?, String>(
      key: 'duration',
      parse: (v) => google_protobuf_duration.Duration.fromString(v),
      acceptCamelCase: true,
    ),
    timestamp: json.valueTo<google_protobuf_timestamp.Timestamp?, String>(
      key: 'timestamp',
      parse: (v) => google_protobuf_timestamp.Timestamp.fromRfc3339(v),
      acceptCamelCase: true,
    ),
  );
}