whenOrNull<TResult extends Object?> method

  1. @optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  1. TResult? source(
    1. String id,
    2. String name,
    3. ElectricalState state,
    4. double nominalVoltage,
    5. double shortCircuitCapacity,
    6. ConductorAttributes? mainFeedCable,
    7. MeasurementState? lastMeasurement,
    8. AssetMetadata assetMetadata,
    9. List<ElectricalNodeDto> children,
    )?,
  2. TResult? panel(
    1. String id,
    2. String name,
    3. ElectricalState state,
    4. double nominalVoltage,
    5. ConductorAttributes? inputCable,
    6. MeasurementState? lastMeasurement,
    7. AssetMetadata assetMetadata,
    8. List<ElectricalNodeDto> children,
    )?,
  3. TResult? protection(
    1. String id,
    2. String name,
    3. ElectricalState state,
    4. MeasurementState? lastMeasurement,
    5. AssetMetadata assetMetadata,
    6. ProtectionType protectionType,
    7. double ratingAmps,
    8. double? pdc,
    9. String curve,
    10. double sensitivity,
    11. int poles,
    12. List<ElectricalNodeDto> children,
    13. CatalogMetadata? catalogData,
    14. CatalogMetadata? cableCatalogData,
    )?,
  4. TResult? load(
    1. String id,
    2. String name,
    3. ElectricalState state,
    4. ConductorAttributes? inputCable,
    5. MeasurementState? lastMeasurement,
    6. AssetMetadata assetMetadata,
    7. double powerWatts,
    8. double cosPhi,
    9. LoadType type,
    10. bool isThreePhase,
    11. CatalogMetadata? cableCatalogData,
    )?,
})
inherited

Implementation

@optionalTypeArgs
TResult? whenOrNull<TResult extends Object?>({
  TResult? Function(
          String id,
          String name,
          ElectricalState state,
          double nominalVoltage,
          double shortCircuitCapacity,
          ConductorAttributes? mainFeedCable,
          MeasurementState? lastMeasurement,
          AssetMetadata assetMetadata,
          List<ElectricalNodeDto> children)?
      source,
  TResult? Function(
          String id,
          String name,
          ElectricalState state,
          double nominalVoltage,
          ConductorAttributes? inputCable,
          MeasurementState? lastMeasurement,
          AssetMetadata assetMetadata,
          List<ElectricalNodeDto> children)?
      panel,
  TResult? Function(
          String id,
          String name,
          ElectricalState state,
          MeasurementState? lastMeasurement,
          AssetMetadata assetMetadata,
          ProtectionType protectionType,
          double ratingAmps,
          double? pdc,
          String curve,
          double sensitivity,
          int poles,
          List<ElectricalNodeDto> children,
          CatalogMetadata? catalogData,
          CatalogMetadata? cableCatalogData)?
      protection,
  TResult? Function(
          String id,
          String name,
          ElectricalState state,
          ConductorAttributes? inputCable,
          MeasurementState? lastMeasurement,
          AssetMetadata assetMetadata,
          double powerWatts,
          double cosPhi,
          LoadType type,
          bool isThreePhase,
          CatalogMetadata? cableCatalogData)?
      load,
}) =>
    throw _privateConstructorUsedError;