diff --git a/example/lib/src/ble/ble_device_interactor.dart b/example/lib/src/ble/ble_device_interactor.dart index 3d09b509..bf528cab 100644 --- a/example/lib/src/ble/ble_device_interactor.dart +++ b/example/lib/src/ble/ble_device_interactor.dart @@ -48,7 +48,7 @@ class BleDeviceInteractor { _logMessage('Discovering services finished'); return result; } on Exception catch (e) { - _logMessage('Error occured when discovering services: $e'); + _logMessage('Error occurred when discovering services: $e'); rethrow; } } @@ -62,7 +62,7 @@ class BleDeviceInteractor { return result; } on Exception catch (e, s) { _logMessage( - 'Error occured when reading ${characteristic.characteristicId} : $e', + 'Error occurred when reading ${characteristic.characteristicId} : $e', ); // ignore: avoid_print print(s); @@ -70,7 +70,7 @@ class BleDeviceInteractor { } } - Future writeCharacterisiticWithResponse( + Future writeCharacteristicWithResponse( QualifiedCharacteristic characteristic, List value) async { try { _logMessage( @@ -78,7 +78,7 @@ class BleDeviceInteractor { await _writeWithResponse(characteristic, value: value); } on Exception catch (e, s) { _logMessage( - 'Error occured when writing ${characteristic.characteristicId} : $e', + 'Error occurred when writing ${characteristic.characteristicId} : $e', ); // ignore: avoid_print print(s); @@ -86,7 +86,7 @@ class BleDeviceInteractor { } } - Future writeCharacterisiticWithoutResponse( + Future writeCharacteristicWithoutResponse( QualifiedCharacteristic characteristic, List value) async { try { await _writeWithoutResponse(characteristic, value: value); @@ -94,7 +94,7 @@ class BleDeviceInteractor { 'Write without response value: $value to ${characteristic.characteristicId}'); } on Exception catch (e, s) { _logMessage( - 'Error occured when writing ${characteristic.characteristicId} : $e', + 'Error occurred when writing ${characteristic.characteristicId} : $e', ); // ignore: avoid_print print(s); diff --git a/example/lib/src/ui/device_detail/characteristic_interaction_dialog.dart b/example/lib/src/ui/device_detail/characteristic_interaction_dialog.dart index d2a252f5..832cbb8b 100644 --- a/example/lib/src/ui/device_detail/characteristic_interaction_dialog.dart +++ b/example/lib/src/ui/device_detail/characteristic_interaction_dialog.dart @@ -17,9 +17,8 @@ class CharacteristicInteractionDialog extends StatelessWidget { builder: (context, interactor, _) => _CharacteristicInteractionDialog( characteristic: characteristic, readCharacteristic: interactor.readCharacteristic, - writeWithResponse: interactor.writeCharacterisiticWithResponse, - writeWithoutResponse: - interactor.writeCharacterisiticWithoutResponse, + writeWithResponse: interactor.writeCharacteristicWithResponse, + writeWithoutResponse: interactor.writeCharacteristicWithoutResponse, subscribeToCharacteristic: interactor.subScribeToCharacteristic, )); } diff --git a/example/lib/src/ui/device_detail/device_interaction_tab.dart b/example/lib/src/ui/device_detail/device_interaction_tab.dart index 0fa648a5..716d460b 100644 --- a/example/lib/src/ui/device_detail/device_interaction_tab.dart +++ b/example/lib/src/ui/device_detail/device_interaction_tab.dart @@ -182,7 +182,7 @@ class _ServiceDiscoveryListState extends State<_ServiceDiscoveryList> { super.initState(); } - String _charactisticsSummary(DiscoveredCharacteristic c) { + String _characteristicsSummary(DiscoveredCharacteristic c) { final props = []; if (c.isReadable) { props.add("read"); @@ -215,7 +215,7 @@ class _ServiceDiscoveryListState extends State<_ServiceDiscoveryList> { deviceId: deviceId), )), title: Text( - '${characteristic.characteristicId}\n(${_charactisticsSummary(characteristic)})', + '${characteristic.characteristicId}\n(${_characteristicsSummary(characteristic)})', style: const TextStyle( fontSize: 14, ), diff --git a/packages/flutter_reactive_ble/lib/src/reactive_ble.dart b/packages/flutter_reactive_ble/lib/src/reactive_ble.dart index 9bf00d14..2cfb4fc7 100644 --- a/packages/flutter_reactive_ble/lib/src/reactive_ble.dart +++ b/packages/flutter_reactive_ble/lib/src/reactive_ble.dart @@ -18,7 +18,7 @@ class FlutterReactiveBle { factory FlutterReactiveBle() => _sharedInstance; - ///Create a new instance where injected depedencies are used. + ///Create a new instance where injected dependencies are used. @visibleForTesting FlutterReactiveBle.witDependencies({ required DeviceScanner deviceScanner, @@ -245,7 +245,7 @@ class FlutterReactiveBle { /// Disconnecting the device is achieved by cancelling the stream subscription. /// /// [id] is the unique device id of the BLE device: in iOS this is a uuid and on Android this is - /// a Mac-Adress. + /// a Mac-Address. /// Use [servicesWithCharacteristicsToDiscover] to scan only for the specific services mentioned in this map, /// this can improve the connection speed on iOS since no full service discovery will be executed. On Android /// this variable is ignored since partial discovery is not possible. @@ -271,7 +271,7 @@ class FlutterReactiveBle { /// /// Disconnecting the device is achieved by cancelling the stream subscription. /// - /// The [prescanDuration] is the amount of time BLE disovery should run in order to find the device. + /// The [prescanDuration] is the amount of time BLE discovery should run in order to find the device. /// Use [servicesWithCharacteristicsToDiscover] to scan only for the specific services mentioned in this map, /// this can improve the connection speed on iOS since no full service discovery will be executed. On Android /// this variable is ignored since partial discovery is not possible. diff --git a/packages/flutter_reactive_ble/lib/src/rx_ext/serial_disposable.dart b/packages/flutter_reactive_ble/lib/src/rx_ext/serial_disposable.dart index 18e3b862..096d364c 100644 --- a/packages/flutter_reactive_ble/lib/src/rx_ext/serial_disposable.dart +++ b/packages/flutter_reactive_ble/lib/src/rx_ext/serial_disposable.dart @@ -40,7 +40,7 @@ class _SerialAlreadyDisposed extends Error { String toString() => "An instance of $_type has already been disposed"; } -/// A [SerialDisposable] that constains an underlying stream subscription. +/// A [SerialDisposable] that contains an underlying stream subscription. class StreamSubscriptionSerialDisposable extends SerialDisposable { StreamSubscriptionSerialDisposable() diff --git a/packages/reactive_ble_mobile/ios/Classes/Prelude/CoreBluetooth+Extensions.swift b/packages/reactive_ble_mobile/ios/Classes/Prelude/CoreBluetooth+Extensions.swift index a4c7c790..e66458fc 100644 --- a/packages/reactive_ble_mobile/ios/Classes/Prelude/CoreBluetooth+Extensions.swift +++ b/packages/reactive_ble_mobile/ios/Classes/Prelude/CoreBluetooth+Extensions.swift @@ -13,7 +13,7 @@ import class CoreBluetooth.CBPeripheral // // Thus this code shadows original property declarations in CoreBluetooth // and changes their semantics from `unsafe non-optional` to `weak optional` -// to mimic Xcode 13 behaviour. +// to mimic Xcode 13 behavior. // // - Note: This code compiles only when using Xcode 12 and below. // - SeeAlso: https://forums.swift.org/t/is-unowned-unsafe-t-weak-t-a-breaking-change/49917 diff --git a/packages/reactive_ble_platform_interface/lib/src/model/connection_priority.dart b/packages/reactive_ble_platform_interface/lib/src/model/connection_priority.dart index 2ad3951f..c16d8b24 100644 --- a/packages/reactive_ble_platform_interface/lib/src/model/connection_priority.dart +++ b/packages/reactive_ble_platform_interface/lib/src/model/connection_priority.dart @@ -9,7 +9,7 @@ enum ConnectionPriority { /// high priority, low latency connection. highPerformance, - // reduced power, low data rate connennection. + // reduced power, low data rate connection. lowPower, } diff --git a/packages/reactive_ble_platform_interface/lib/src/model/discovered_characteristic.dart b/packages/reactive_ble_platform_interface/lib/src/model/discovered_characteristic.dart index 3e0a721f..f63c0d90 100644 --- a/packages/reactive_ble_platform_interface/lib/src/model/discovered_characteristic.dart +++ b/packages/reactive_ble_platform_interface/lib/src/model/discovered_characteristic.dart @@ -2,7 +2,7 @@ import 'package:meta/meta.dart'; import 'uuid.dart'; -/// Specific BLE characteristic for a BLE device characterised by [deviceId], [serviceId] and +/// Specific BLE characteristic for a BLE device characterized by [deviceId], [serviceId] and /// [characteristicId]. @immutable class DiscoveredCharacteristic { diff --git a/packages/reactive_ble_platform_interface/lib/src/model/log_level.dart b/packages/reactive_ble_platform_interface/lib/src/model/log_level.dart index a04deb14..5cd999a6 100644 --- a/packages/reactive_ble_platform_interface/lib/src/model/log_level.dart +++ b/packages/reactive_ble_platform_interface/lib/src/model/log_level.dart @@ -1,4 +1,4 @@ -/// States the level of debuglogging within this library +/// States the level of debug logging within this library enum LogLevel { /// No debugLogging at all. This is the default level within the library. none, diff --git a/packages/reactive_ble_platform_interface/lib/src/model/qualified_characteristic.dart b/packages/reactive_ble_platform_interface/lib/src/model/qualified_characteristic.dart index b04bf73e..e1486ea2 100644 --- a/packages/reactive_ble_platform_interface/lib/src/model/qualified_characteristic.dart +++ b/packages/reactive_ble_platform_interface/lib/src/model/qualified_characteristic.dart @@ -2,7 +2,7 @@ import 'package:meta/meta.dart'; import 'uuid.dart'; -/// Specific BLE characteristic for a BLE device characterised by [deviceId], [serviceId] and +/// Specific BLE characteristic for a BLE device characterized by [deviceId], [serviceId] and /// [characteristicId]. @immutable class QualifiedCharacteristic { diff --git a/packages/reactive_ble_platform_interface/lib/src/model/result.dart b/packages/reactive_ble_platform_interface/lib/src/model/result.dart index 03f1ead4..1aa41932 100644 --- a/packages/reactive_ble_platform_interface/lib/src/model/result.dart +++ b/packages/reactive_ble_platform_interface/lib/src/model/result.dart @@ -2,7 +2,7 @@ import 'package:meta/meta.dart'; ///Result of a ble operation. /// -/// In case the result is succesfull [Failure] is null. +/// In case the result is successful [Failure] is null. @immutable class Result { const Result.success(this._value) diff --git a/packages/reactive_ble_platform_interface/lib/src/model/scan_mode.dart b/packages/reactive_ble_platform_interface/lib/src/model/scan_mode.dart index ed32889b..63d5d1a5 100644 --- a/packages/reactive_ble_platform_interface/lib/src/model/scan_mode.dart +++ b/packages/reactive_ble_platform_interface/lib/src/model/scan_mode.dart @@ -1,16 +1,16 @@ -///Android only: mode in which BLE discovery is executed. +/// Android only: mode in which BLE discovery is executed. enum ScanMode { /// passively listen for other scan results without starting BLE scan itself. opportunistic, - /// scanmode which has the lowest battery consumption. + /// Scan mode which has the lowest battery consumption. lowPower, - /// scanmode that is a good compromise between battery consumption and latency. + /// Scan mode that is a good compromise between battery consumption and latency. balanced, - ///Scanmode with highest battery consumption and lowest latency. - ///Should not be used when scanning for a long time. + /// Scan mode with highest battery consumption and lowest latency. + /// Should not be used when scanning for a long time. lowLatency, } diff --git a/packages/reactive_ble_platform_interface/lib/src/reactive_ble_platform_interface.dart b/packages/reactive_ble_platform_interface/lib/src/reactive_ble_platform_interface.dart index 4baed12b..d5a81781 100644 --- a/packages/reactive_ble_platform_interface/lib/src/reactive_ble_platform_interface.dart +++ b/packages/reactive_ble_platform_interface/lib/src/reactive_ble_platform_interface.dart @@ -148,7 +148,7 @@ abstract class ReactiveBlePlatform extends PlatformInterface { 'writeCharacteristicWithoutResponse has not been implemented.'); } - /// Starts subscribing to notifications for a specificied characteristic. + /// Starts subscribing to notifications for a specified characteristic. /// /// This stream only returns the result of the operation. Value updates should /// be propagated to [charValueUpdateStream]. @@ -159,12 +159,12 @@ abstract class ReactiveBlePlatform extends PlatformInterface { 'subscribeToNotifications has not been implemented.'); } - /// Stops subscribing to notifications for a specificied characteristic. + /// Stops subscribing to notifications for a specified characteristic. Future stopSubscribingToNotifications( QualifiedCharacteristic characteristic, ) { throw UnimplementedError( - 'stopSubscribingToNotifiations has not been implemented.'); + 'stopSubscribingToNotifications has not been implemented.'); } /// Requests a specific MTU for a connected device. @@ -179,6 +179,6 @@ abstract class ReactiveBlePlatform extends PlatformInterface { Future requestConnectionPriority( String deviceId, ConnectionPriority priority) { throw UnimplementedError( - 'requesConnectionPriority has not been implemented.'); + 'requestConnectionPriority has not been implemented.'); } }