maybeWhen<TResult extends Object?> method

  1. @optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
  1. TResult protection(
    1. String id,
    2. String name,
    3. String? manufacturer,
    4. String? series,
    5. bool isFavorite,
    6. double ratedCurrent,
    7. String curveType,
    8. double breakingCapacity,
    9. int poles,
    10. ProtectionDeviceType deviceType,
    11. double? sensitivity,
    12. double? price,
    )?,
  2. TResult cable(
    1. String id,
    2. String name,
    3. String? manufacturer,
    4. String? series,
    5. bool isFavorite,
    6. double section,
    7. CableMaterial material,
    8. String insulationType,
    9. double maxOperatingTemp,
    10. String? installationMethod,
    11. double? price,
    )?,
  3. TResult source(
    1. String id,
    2. String name,
    3. String? manufacturer,
    4. String? series,
    5. bool isFavorite,
    6. double voltage,
    7. double maxShortCircuitCurrent,
    8. double? ratedPower,
    9. SourceType sourceType,
    10. double? price,
    )?,
  4. required TResult orElse(),
})
inherited

Implementation

@optionalTypeArgs
TResult maybeWhen<TResult extends Object?>({
  TResult Function(
          String id,
          String name,
          String? manufacturer,
          String? series,
          bool isFavorite,
          double ratedCurrent,
          String curveType,
          double breakingCapacity,
          int poles,
          ProtectionDeviceType deviceType,
          double? sensitivity,
          double? price)?
      protection,
  TResult Function(
          String id,
          String name,
          String? manufacturer,
          String? series,
          bool isFavorite,
          double section,
          CableMaterial material,
          String insulationType,
          double maxOperatingTemp,
          String? installationMethod,
          double? price)?
      cable,
  TResult Function(
          String id,
          String name,
          String? manufacturer,
          String? series,
          bool isFavorite,
          double voltage,
          double maxShortCircuitCurrent,
          double? ratedPower,
          SourceType sourceType,
          double? price)?
      source,
  required TResult orElse(),
}) =>
    throw _privateConstructorUsedError;