listBranches method

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

Implementation

Future<List<TableBranch>> listBranches({List<String>? namespace}) async {
  final response = await _invoke("list_branches", {"namespace": namespace});
  if (response is! JsonContent) {
    throw RoomServerException("unexpected return type from datasets.list_branches call");
  }
  final branches = response.json["branches"];
  if (branches is! List) {
    throw RoomServerException("unexpected return type from datasets.list_branches call");
  }
  return branches.map((value) => TableBranch.fromJson(Map<String, dynamic>.from(value as Map))).toList(growable: false);
}