FlutterAccessorySetup class

The main class of the library that provides service functionality Use it to activate the session and find and configure devices

Constructors

FlutterAccessorySetup({@visibleForTesting FFIAccessorySessionAdapter? sessionAdapter, @visibleForTesting DelegateAdapterFactory delegateAdapterFactory = DelegateAdapter.new, @visibleForTesting NSArray listConverter(List<Object?>)?, @visibleForTesting NativeCodeError nsErrorConverter(NSError)?})

Properties

accessories List<ASAccessory>
no setter
eventStream Stream<ASAccessoryEvent>
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() → void
Activates the session. You should activate the session before using it
dispose() → void
failAuthorizationForAccessory(ASAccessory accessory) Future<void>
Fails the Authorization for the accessory
finishAuthorizationForAccessory(ASAccessory accessory, ASAccessorySettings settings) Future<void>
Finishes the Authorization for accessory using ASAccessorySettings
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printNativeSessionLogs() → void
Prints logs from the native code Use it for debugging the native part of the code
removeAccessory(ASAccessory accessory) Future<void>
Removes provided accessory (disconnects from the app)
renameAccessory(ASAccessory accessory, ASAccessoryRenameOptions options) Future<void>
Renames provided accessory using the ASAccessoryRenameOptions
showPicker() Future<void>
Shows device picker
showPickerForDevice(String name, String asset, String serviceID) Future<void>
Shows device picker configured for a single device parameters:
showPickerForItems(List<ASPickerDisplayItem> items) Future<void>
Shows device picker configured with list of ASPickerDisplayItem
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

nativeUIImageWithDartAsset(String asset) Future<UIImage?>