removeLanguageGroupFallback method
T024: Removes a language group fallback for a locale. This is idempotent - removing a non-existent fallback is safe.
Implementation
Future<void> removeLanguageGroupFallback(String locale) async {
final state = await _stateStore.load(
config: config,
projectRootPath: projectRootPath,
);
if (!state.languageGroupFallbacks.containsKey(locale)) {
return; // Idempotent: no-op if not present
}
final updatedFallbacks = Map<String, String>.from(state.languageGroupFallbacks)..remove(locale);
final updatedState = state.copyWith(languageGroupFallbacks: updatedFallbacks);
await _stateStore.save(
config: config,
projectRootPath: projectRootPath,
state: updatedState,
);
}