SmartHomeContent class final

A smart home device's setup code: Matter (MT:…) or HomeKit (X-HM://…), from the label on the device or its box.

Only parsed. toPayload returns raw.

Inheritance

Constructors

SmartHomeContent({required SmartHomePlatform platform, required String setupCode, required String raw, int? vendorId, int? productId, int? discriminator, int? category, String? setupId})
Creates smart home content.
const

Properties

category → int?
The HomeKit accessory category: 5 is a light, 7 an outlet, 8 a switch, 9 a thermostat, 10 a sensor and so on.
final
discriminator → int?
The Matter discriminator (12 bits), which tells devices apart while pairing.
final
hashCode → int
The hash code for this object.
no setteroverride
platform → SmartHomePlatform
Matter or HomeKit.
final
productId → int?
The Matter product id.
final
raw → String
The text as read.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
setupCode → String
The code a person would type instead: the Matter passcode as 8 digits (20202021), the HomeKit code as 123-45-678.
final
setupId → String?
The HomeKit setup id (4 characters).
final
uri → Uri?
A link that opens this content in the app made for it, for launchUrl of package:url_launcher; null when there is none.
no setterinherited
vendorId → int?
The Matter vendor id.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toPayload() → String
raw, the text as read.
override
toString() → String
Without the setup code.
override
validate() → List<ContentIssue>
The problems that keep toPayload from building this value, such as an empty network name or a latitude out of range. Empty when the value can be built. For forms: show each ContentIssue.message next to its ContentIssue.field.
override

Operators

operator ==(Object other) → bool
The equality operator.
override