getSection static method

Map<String, dynamic> getSection(
  1. String sectionPrefix
)

Accéder à une section de configuration

Implementation

static Map<String, dynamic> getSection(String sectionPrefix) {
  final section = <String, dynamic>{};

  _config.forEach((key, value) {
    if (key.startsWith('$sectionPrefix.')) {
      final subKey = key.substring(sectionPrefix.length + 1);
      section[subKey] = value;
    }
  });

  return section;
}