dispose method
Disposes native P2P and BLE resources and cleans up connections.
Should be called when the plugin is no longer needed to release system resources. Returns a Future that completes when disposal is done.
Implementation
@override
Future<void> dispose() async {
// Clear cached streams on dispose
_hotspotInfoStream = null;
_clientStateStream = null;
_bleConnectionStateStream = null;
_bleScanResultStream = null;
_bleReceivedDataStream = null;
await methodChannel.invokeMethod('dispose');
}