restoreState method

Map<String, dynamic>? restoreState(
  1. String moduleId
)

Restore preserved state after module reload

Returns the preserved state or null if not available.

Implementation

Map<String, dynamic>? restoreState(String moduleId) {
  if (!kDebugMode) return null;
  final state = _preservedState.remove(moduleId);
  if (state != null) {
    AirLogger.debug(
      'Restored state from HMR',
      context: {'moduleId': moduleId, 'keys': state.keys.toList()},
    );
  }
  return state;
}