String formatKey(String key) { return key.replaceAll('_', ' ').split(' ').map((word) { if (word.isEmpty) return ''; return word[0].toUpperCase() + word.substring(1); }).join(' '); }