section method

Section section(
  1. String name
)

Implementation

Section section(String name) {
  var i = configFile.sections.indexWhere((s) => s.name == name);
  if (i == -1) {
    var s = Section(name);
    configFile.sections.add(s);
    return s;
  }

  return configFile.sections[i];
}