updateSettings method

void updateSettings(
  1. ChatSettings settings
)

Updates preferences and notifies listeners before host persistence completes.

Implementation

void updateSettings(ChatSettings settings) {
  _settings = settings;
  notifyListeners();
  // Persistence is deliberately non-blocking: settings remain responsive
  // when a host app's network/database callback fails.
  Future.sync(() => onSettingsChanged?.call(settings)).catchError((_) {});
}