KeyRange.fromJson constructor

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

Implementation

factory KeyRange.fromJson(Map<String, dynamic> json) {
  return KeyRange(
    lower: json.containsKey('lower')
        ? Key.fromJson(json['lower'] as Map<String, dynamic>)
        : null,
    upper: json.containsKey('upper')
        ? Key.fromJson(json['upper'] as Map<String, dynamic>)
        : null,
    lowerOpen: json['lowerOpen'] as bool? ?? false,
    upperOpen: json['upperOpen'] as bool? ?? false,
  );
}