generatorTrendsApiFamily top-level property
final
Implementation
final generatorTrendsApiFamily =
FutureProvider.family<List<TrendValueDTO>, TrendApiArgs>(
(ref, TrendApiArgs args) {
final currentTime = ref.watch(currentDateTimeProvider);
return ref.watch(energyManagementV3ApiProvider.future).then(
(api) {
final timeSince = args.timeSpan != null
? timeSpanToTimeSince(args.timeSpan!, currentTime())
: null;
return api.kemApiV3DevicesIdTrendsTrendGet(
id: args.deviceId,
trend: args.trend,
since: timeSince,
);
},
).then(responseToValue);
},
);