ProvQrPayload class final
The JSON payload printed by provisioning firmware as a QR code, e.g.
{"ver":"v1","name":"PROV_1A2B3C","username":"wifiprov","pop":"abcd1234", "transport":"ble"}.
Constructors
- ProvQrPayload({required String version, required String name, required String transport, String? pop, String? username, String? password, int? security, String? network})
-
Creates a payload.
const
- ProvQrPayload.parse(String json)
-
Parses the QR string. Throws FormatException when it is not a JSON
object or has no non-empty
name.factory
Properties
- credentials → ProvCredentials
-
Credentials implied by the payload.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isBle → bool
-
Whether the device should be reached over BLE.
no setter
- name → String
-
Advertised device name, e.g.
PROV_1A2B3C.final - network → String?
-
wifiorthreadwhen the firmware states it.final - password → String?
-
Security 2 password when given explicitly.
final
- pop → String?
-
Security 1 proof of possession, or the Security 2 password in the
stock ESP-IDF examples.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- security → int?
-
Explicit
securityfield; the stock examples omit it.final - transport → String
-
bleorsoftap.final - username → String?
-
Security 2 username.
final
- version → String
-
Payload format version, usually
v1.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited