ComponentTemplate class sealed

Component templates for the electrical component library. These are reusable specifications that can be instantiated in diagrams.

Implementers
Annotations

Constructors

ComponentTemplate.cable({required String id, required String name, String? manufacturer, String? series, @Default(false) bool isFavorite, required double section, required CableMaterial material, required String insulationType, required double maxOperatingTemp, String? installationMethod, double? price})
const
factory
ComponentTemplate.protection({required String id, required String name, String? manufacturer, String? series, @Default(false) bool isFavorite, required double ratedCurrent, required String curveType, required double breakingCapacity, required int poles, @Default(ProtectionDeviceType.circuitBreaker) ProtectionDeviceType deviceType, double? sensitivity, double? price})
const
factory
ComponentTemplate.source({required String id, required String name, String? manufacturer, String? series, @Default(false) bool isFavorite, required double voltage, required double maxShortCircuitCurrent, double? ratedPower, @Default(SourceType.grid) SourceType sourceType, double? price})
const
factory

Properties

copyWith → $ComponentTemplateCopyWith<ComponentTemplate>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
no setterinherited
isFavorite bool
no setterinherited
manufacturer String?
no setterinherited
name String
no setterinherited
price double?
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
series String?
no setterinherited

Methods

map<TResult extends Object?>({required TResult protection(ProtectionTemplate value), required TResult cable(CableTemplate value), required TResult source(SourceTemplate value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? protection(ProtectionTemplate value)?, TResult? cable(CableTemplate value)?, TResult? source(SourceTemplate value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult protection(ProtectionTemplate value)?, TResult cable(CableTemplate value)?, TResult source(SourceTemplate value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult protection(String id, String name, String? manufacturer, String? series, bool isFavorite, double ratedCurrent, String curveType, double breakingCapacity, int poles, ProtectionDeviceType deviceType, double? sensitivity, double? price)?, TResult cable(String id, String name, String? manufacturer, String? series, bool isFavorite, double section, CableMaterial material, String insulationType, double maxOperatingTemp, String? installationMethod, double? price)?, TResult source(String id, String name, String? manufacturer, String? series, bool isFavorite, double voltage, double maxShortCircuitCurrent, double? ratedPower, SourceType sourceType, double? price)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult protection(String id, String name, String? manufacturer, String? series, bool isFavorite, double ratedCurrent, String curveType, double breakingCapacity, int poles, ProtectionDeviceType deviceType, double? sensitivity, double? price), required TResult cable(String id, String name, String? manufacturer, String? series, bool isFavorite, double section, CableMaterial material, String insulationType, double maxOperatingTemp, String? installationMethod, double? price), required TResult source(String id, String name, String? manufacturer, String? series, bool isFavorite, double voltage, double maxShortCircuitCurrent, double? ratedPower, SourceType sourceType, double? price)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? protection(String id, String name, String? manufacturer, String? series, bool isFavorite, double ratedCurrent, String curveType, double breakingCapacity, int poles, ProtectionDeviceType deviceType, double? sensitivity, double? price)?, TResult? cable(String id, String name, String? manufacturer, String? series, bool isFavorite, double section, CableMaterial material, String insulationType, double maxOperatingTemp, String? installationMethod, double? price)?, TResult? source(String id, String name, String? manufacturer, String? series, bool isFavorite, double voltage, double maxShortCircuitCurrent, double? ratedPower, SourceType sourceType, double? price)?}) → TResult?
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited