KeyValue.fromJson constructor

KeyValue.fromJson(
  1. List json
)

Implementation

factory KeyValue.fromJson(List<dynamic> json) {
  final String key = json[0] as String;
  final String? value = json[1] as String?;
  return KeyValue(
    key: Uint8List.fromList(hex.decode(key.substring(2))),
    value: value == null
        ? null
        : Uint8List.fromList(hex.decode(value.substring(2))),
  );
}