getTranslationTerms method

Set<String> getTranslationTerms()

Implementation

Set<String> getTranslationTerms() {
  final arbFiles = find('*.arb').toList();

  final arbTerms = <String>{};

  for (final path in arbFiles) {
    final content = File(path).readAsStringSync();
    final map = jsonDecode(content) as Map<String, dynamic>;
    for (final entry in map.entries) {
      if (!entry.key.startsWith('@')) {
        arbTerms.add(entry.key);
      }
    }
  }
  return arbTerms;
}