Model class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
-
Model({required String id, required String name, String? flespiId, InboundProtocol? protocol, String? protocolId, bool? isGeneric, @Default.new([]) List<
CommandDefinition> commandsStructure, @Default.new([]) List<ConfigGrouping> configStructure, @Default.new(false) bool confiotCapable, @JsonKey.new(unknownEnumValue: ConfIoTLayout.standard) @Default.new(ConfIoTLayout.standard) ConfIoTLayout confiotLayout, String? confiotName, String? peripheralIdentifier, Map<String, dynamic> ? peripheralParserSpec, @Default.new([]) List<FirmwareBuild> firmwares}) -
Model is the model of a device. It contains the information about the model of the device.
Does not contain information of connectivity or related, only the model information like the name, the
protocol and if is generic or not.
constfactory
-
Model.fromJson(Map<
String, dynamic> json) -
factory
Properties
-
commandsStructure
→ List<
CommandDefinition> -
commandsStructureis the structure of the commands for the protocol.no setterinherited -
configStructure
→ List<
ConfigGrouping> -
configStructureis the structure of the configuration for the protocol.no setterinherited - confiotCapable → bool
-
confiotCapableis the boolean that indicates if the protocol is capable of using the Confiot platform.no setterinherited - confiotLayout → ConfIoTLayout
-
confiotLayoutdefines what kind of layout should be displayed in ConfIoT.no setterinherited - confiotName → String?
-
confiotNameis the name of the model in the ConfIoT.no setterinherited -
copyWith
→ $ModelCopyWith<
Model> -
Create a copy of Model
with the given fields replaced by the non-null parameter values.
no setterinherited
-
firmwares
→ List<
FirmwareBuild> -
firmwaresis the list of firmwares for the model.no setterinherited - flespiId → String?
-
flespiIdis the ID of the device in the flespi platform. Can be null if the model is not connected to a device or is a in-house protocol.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
idis the unique identifier of the model.no setterinherited - isGeneric → bool?
-
isGenericis true if the model is generic.no setterinherited - name → String
-
nameis the name of the model.no setterinherited - peripheralIdentifier → String?
-
peripheralIdentifieris the identifier of the peripheral device.no setterinherited -
peripheralParserSpec
→ Map<
String, dynamic> ? -
peripheralParserSpecis the parser specification for the peripheral device.no setterinherited - protocol → InboundProtocol?
-
protocolis the protocol of the model.no setterinherited - protocolId → String?
-
protocolIdis the ID of the protocolno setterinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_Model value)) → TResult -
Available on Model, provided by the ModelPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_Model value)?) → TResult? -
Available on Model, provided by the ModelPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_Model value)?, {required TResult orElse()}) → TResult -
Available on Model, provided by the ModelPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(String id, String name, String? flespiId, InboundProtocol? protocol, String? protocolId, bool? isGeneric, List< CommandDefinition> commandsStructure, List<ConfigGrouping> configStructure, bool confiotCapable, ConfIoTLayout confiotLayout, String? confiotName, String? peripheralIdentifier, Map<String, dynamic> ? peripheralParserSpec, List<FirmwareBuild> firmwares)?, {required TResult orElse()}) → TResult -
Available on Model, provided by the ModelPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Serializes this Model to a JSON map.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(String id, String name, String? flespiId, InboundProtocol? protocol, String? protocolId, bool? isGeneric, List< CommandDefinition> commandsStructure, List<ConfigGrouping> configStructure, bool confiotCapable, ConfIoTLayout confiotLayout, String? confiotName, String? peripheralIdentifier, Map<String, dynamic> ? peripheralParserSpec, List<FirmwareBuild> firmwares)) → TResult -
Available on Model, provided by the ModelPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(String id, String name, String? flespiId, InboundProtocol? protocol, String? protocolId, bool? isGeneric, List< CommandDefinition> commandsStructure, List<ConfigGrouping> configStructure, bool confiotCapable, ConfIoTLayout confiotLayout, String? confiotName, String? peripheralIdentifier, Map<String, dynamic> ? peripheralParserSpec, List<FirmwareBuild> firmwares)?) → TResult? -
Available on Model, provided by the ModelPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited