getNextDatapoint<ChildData extends Data, ParentData extends WithOffline?> method
- ParentData data
gets all the ChildData
points for the given ParentData
if no ParentData
is given it defaults to root
Implementation
Future<List<ChildData>>
getNextDatapoint<ChildData extends Data, ParentData extends WithOffline?>(
ParentData data,
) async {
final childTypeStr = Helper.getIdentifierFromData<ChildData>(null);
if (childTypeStr == null) throw Exception('type not supported');
return (await _getAllForNextLevel<ChildData, ParentData>(
json: data?.toSmallJson(),
id: data?.id,
)) ??
[];
}