25 lines
775 B
Dart
25 lines
775 B
Dart
|
|
import 'package:bluetooth_classic/bluetooth_classic.dart';
|
|
import 'package:bluetooth_classic/models/device.dart';
|
|
|
|
class Custombluetoothservice extends BluetoothClassic {
|
|
// @override
|
|
// Stream<Uint8List> onDeviceDataReceived() {
|
|
// return _onDeviceDataReceived ??=
|
|
// super.onDeviceDataReceived().asBroadcastStream();
|
|
// }
|
|
|
|
// Stream<Uint8List>? _onDeviceDataReceived;
|
|
|
|
@override
|
|
Stream<Device> onDeviceDiscovered() =>
|
|
_onDeviceDiscovered ??= super.onDeviceDiscovered().asBroadcastStream();
|
|
Stream<Device>? _onDeviceDiscovered;
|
|
|
|
@override
|
|
Stream<int> onDeviceStatusChanged() =>
|
|
_onDeviceStatusChanged ??=
|
|
super.onDeviceStatusChanged().asBroadcastStream();
|
|
Stream<int>? _onDeviceStatusChanged;
|
|
|
|
} |