getNextStandardSection method

double getNextStandardSection(
  1. double minCurrent,
  2. ConductorMaterial material,
  3. ConductorInsulation insulation,
  4. InstallationMethod method,
)

Helper to get next standard section

Implementation

double getNextStandardSection(double minCurrent, ConductorMaterial material,
    ConductorInsulation insulation, InstallationMethod method) {
  final map = (material == ConductorMaterial.copper)
      ? copperPvc3PhMethodB2
      : aluXlpe3PhMethodB2;

  for (var entry in map.entries) {
    if (entry.value >= minCurrent) {
      return entry.key;
    }
  }
  return 0.0;
}