refreshHomeownerApp function
Implementation
Future<void> refreshHomeownerApp({
required BuildContext context,
}) async {
final home = context.read(currentHomeProvider);
final deviceId = home.valueOrNull?.devices.first.id;
final refreshGeneratorDetails = context.read(refreshGeneratorDetailsProvider);
await Future.wait([
context.asyncRefresh(homeownerApiProvider),
context.asyncRefresh(homesApiProvider),
if (deviceId != null) ...[
refreshGeneratorDetails(context, deviceId),
refreshEventLog(context, deviceId),
],
]);
}