OutboundProtocol class abstract

Available extensions
Annotations
  • @freezed

Constructors

OutboundProtocol({required String id, required String name, @ColorConverter() required Color color, required bool isEnabled, @Default.new([]) List<String> categoriesIds, bool? hasFtp, bool? isConsumpted, String? mqttTopic, bool? isAsync, @Default.new([]) List<CredentialField> requiredFields, Avatar? dynamicIcon, int? usage})
const
factory
OutboundProtocol.fromJson(Map<String, dynamic> json)
factory

Properties

categoriesIds List<String>
categoriesIds is the list of categories IDs that the protocol belongs to.
no setterinherited
color Color
color is the color assigned to the protocol.
no setterinherited
copyWith → $OutboundProtocolCopyWith<OutboundProtocol>
Create a copy of OutboundProtocol with the given fields replaced by the non-null parameter values.
no setterinherited
dynamicIcon Avatar?
dynamicIcon is the icon of the inbound protocol. This is the new schema of the icon
no setterinherited
hasFtp bool?
hasFtp indicates if the protocol has support for FTP.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
id is the protocol ID, this ID is unique for each protocol.
no setterinherited
isAsync bool?
isAsync indicates if the protocol is asynchronous.
no setterinherited
isConsumpted bool?
isConsumpted indicates if the protocol is consumpted.
no setterinherited
isEnabled bool
isEnabled indicates if the protocol is enabled and available for use, or disabled and not available for use.
no setterinherited
mqttTopic String?
mqttTopic is the MQTT topic of the protocol.
no setterinherited
name String
name is the name of the protocol. This name is a translation key, so, check the translation messages to get the name, the key is composed by protocols.outbound.{name}.
no setterinherited
requiredFields List<CredentialField>
requiredFields is the list of required fields for the protocol.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
usage int?
usage is the usage of the protocol. This field shuld be only used to show the popularity of the protocol. For marketing purposes.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_OutboundProtocol value)) → TResult

Available on OutboundProtocol, provided by the OutboundProtocolPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_OutboundProtocol value)?) → TResult?

Available on OutboundProtocol, provided by the OutboundProtocolPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_OutboundProtocol value)?, {required TResult orElse()}) → TResult

Available on OutboundProtocol, provided by the OutboundProtocolPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, String name, Color color, bool isEnabled, List<String> categoriesIds, bool? hasFtp, bool? isConsumpted, String? mqttTopic, bool? isAsync, List<CredentialField> requiredFields, Avatar? dynamicIcon, int? usage)?, {required TResult orElse()}) → TResult

Available on OutboundProtocol, provided by the OutboundProtocolPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this OutboundProtocol to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String id, String name, Color color, bool isEnabled, List<String> categoriesIds, bool? hasFtp, bool? isConsumpted, String? mqttTopic, bool? isAsync, List<CredentialField> requiredFields, Avatar? dynamicIcon, int? usage)) → TResult

Available on OutboundProtocol, provided by the OutboundProtocolPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, String name, Color color, bool isEnabled, List<String> categoriesIds, bool? hasFtp, bool? isConsumpted, String? mqttTopic, bool? isAsync, List<CredentialField> requiredFields, Avatar? dynamicIcon, int? usage)?) → TResult?

Available on OutboundProtocol, provided by the OutboundProtocolPatterns extension

A variant of when that fallback to returning null

Operators

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