setCurrentLayout method

Future<void> setCurrentLayout(
  1. String id
)

Set the current active layout

Implementation

Future<void> setCurrentLayout(String id) async {
  if (!_configCache.containsKey(id)) {
    final config = await _storage.getLayoutConfig(id);
    if (config == null) {
      throw Exception('Layout configuration not found: $id');
    }
    _configCache[id] = config;
  }

  _currentLayoutId = id;
  notifyListeners();
  _notifyLayoutChange();
}