list method

Future<List<String>> list({
  1. List<String>? namespace,
})

Implementation

Future<List<String>> list({List<String>? namespace}) async {
  final response = await room.sendRequest("memory.list", {"namespace": namespace});
  if (response is! JsonContent) {
    throw RoomServerException("Invalid return type from memory list call");
  }
  final memories = response.json["memories"];
  if (memories is! List) {
    return [];
  }
  return memories.whereType<String>().toList();
}