finishRefresh method

  1. @protected
Future<void> finishRefresh()

Template method invoked during refresh to complete the refresh process.

Subclasses can override this to perform additional initialization steps or to publish custom events.

Example:

@override
Future<void> finishRefresh() async {
logger.info("Custom finish refresh logic here");
}

This is part of Jetleaf – a framework which developers can use to build web applications.

Implementation

@protected
Future<void> finishRefresh() async {
  // Start lifecycle processor
  _lifecycleProcessor?.onRefresh();

  // Publish refresh event
  await publishEvent(ContextRefreshedEvent.withClock(this, () => DateTime.now()));

  if (logger.getIsDebugEnabled()) {
    logger.debug("${runtimeType} application context refreshed successfully.");
  }

  _isRefreshed = true;

  return Future.value();
}