FlutterAccessorySetup class

The main entry point of the library.

Use it to activate the session and to discover and configure accessories through Apple's AccessorySetupKit. The native session is a singleton; create a single instance and dispose it when you are done.

Constructors

FlutterAccessorySetup({@visibleForTesting AccessorySetupApi? api})

Properties

eventStream Stream<AccessoryEvent>
Stream of session events delivered from the native layer.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

activate() Future<void>
Activates the session. You should activate before using it; the AccessoryEventType.activated event signals that activation completed.
dispose() → void
failAuthorizationForAccessory(Accessory accessory) Future<void>
Fails the authorization for the accessory.
finishAuthorizationForAccessory(Accessory accessory, AccessorySettings settings) Future<void>
Finishes the authorization for the accessory using AccessorySettings.
getAccessories() Future<List<Accessory>>
The accessories currently authorized for this app.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onAccessoryEvent(AccessoryEvent event) → void
printNativeSessionLogs() Future<void>
Prints logs collected by the native layer. Use it for debugging.
removeAccessory(Accessory accessory) Future<void>
Removes the provided accessory (disconnects it from the app).
renameAccessory(Accessory accessory, RenameOptions options) Future<void>
Renames the provided accessory using RenameOptions.
showPicker() Future<void>
Shows the device picker.
showPickerForDevice(String name, String asset, String serviceID) Future<void>
Shows the device picker configured for a single device.
showPickerForItems(List<PickerDisplayItem> items) Future<void>
Shows the device picker configured with a list of PickerDisplayItems.
toString() String
A string representation of this object.
inherited

Operators

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