checkForUpdate method

Future<bool> checkForUpdate(
  1. String module,
  2. String viewId
)

Hot-swap: poll for updates and notify listeners.

Implementation

Future<bool> checkForUpdate(String module, String viewId) async {
  final fullId = '$module/$viewId';
  final cached = await cache.get(fullId);
  if (cached == null) return false;

  final result = await loadView(module, viewId);
  return !result.fromCache && result.definition.version != cached.version;
}