flutter_matter 0.0.8
flutter_matter: ^0.0.8 copied to clipboard
Matter plugin for Flutter
0.0.8 #
New Features #
- ICD (Intermittently Connected Device) support — Matter 1.2+
- Added
ICDDeviceInfomodel class with all fields:symmetricKey,userActiveModeTriggerHint,userActiveModeTriggerInstruction,icdNodeId,icdCounter,monitoredSubject,fabricId,fabricIndex. - Added
onICDRegistrationComplete(int errorCode, ICDDeviceInfo? icdDeviceInfo)to theCompletionListenerinterface — previously a TODO comment. ChipDeviceController.call()now dispatches this callback with proper JSON decoding from the native side.
- Added
- Thread network commissioning —
NetworkCredentialsnow supports Thread in addition to Wi-Fi:- New
ThreadCredentialsclass wrapping a Thread Active Operational Dataset (Uint8List operationalDataset). - New named constructors
NetworkCredentials.wifi(WiFiCredentials)andNetworkCredentials.thread(ThreadCredentials). - Legacy
NetworkCredentials({required WiFiCredentials wifiCredentials})constructor kept for backward compatibility. toJson()correctly serialises whichever credential type is set. The Android native layer already parsed Thread credentials.
- New
setCompletionListeneris now public —Future<void> setCompletionListener(CompletionListener listener)can now be called independently frompairDevice, allowing the listener to be assigned or swapped at any time.unPairDeviceis now fully active —Future<bool> unPairDevice(int nodeId)removes a device from the fabric and was previously commented out. The Android native/unPairDeviceroute was already wired.
Improvements #
DataVersionFiltersupport insubscribe()— ThedataVersionFiltersparameter is no longer ignored. Both the Dart method signature and the Android native layer now parse, pass, and forward the filter list tosubscribeToPath, enabling efficient change-only subscriptions.- Additional public exports —
ChipEventPath,DataVersionFilter, andICDDeviceInfoare now exported frompackage:flutter_matter/flutter_matter.dartso consumers can construct them directly without importing internal paths. - Android package rename — Updated the Android plugin package/group/namespace from
com.zengge.flutter_mattertocom.tyx.flutter_matter. - Example lockfile handling — Stopped tracking
example/pubspec.lockand added it to.gitignoreto avoid noisy example dependency lockfile diffs in plugin commits.
Bug Fixes & Analysis Cleanup #
- Fixed
eventPathsparsing in iOSsubscribe()andreadRequest()so event path payloads are read from the correct request field. - Expanded the Dart
subscribe()/read()API docs and clarified thatdataVersionFiltersis currently supported on Android only. - Removed unused imports:
dart:ffi(controller.dart),dart:collection(node_state.dart),dart:typed_data(tlv_types.dart),flutter/widgets.dart(ble.dart), and several unused imports across the example app. - Removed 7 unused
resultlocal variable assignments inble.dartGATT handler methods. - Fixed stale
@overrideannotation ononCloseBleComplete()in the example app (method was removed from theCompletionListenerinterface). - Fixed unnecessary non-null assertion (
!) onchipDeviceControllerincontrol_page.dart. - Replaced auto-generated stub test files (
plugin_integration_test.dart,widget_test.dart) that referenced non-existent classes with minimal passing placeholder tests. - Added
flutter_lintsas a dev dependency to the example app. - Suppressed
unused_elementlint on the intentionally privateChipPathId._constructor.
0.0.6 #
- version 0.0.6
0.0.1 #
- Initial release.