Improve web (#3)
* Improve web example app * Improve readme * Minor improvements * add github workflow for example app * Fix flutter version in github action * Fix flutter version in github action * Fix flutter version in github action * Fix flutter version in github action * Minor fix * Minor fixes * Update readme and version * Update Changelog * Improve wording * Update CHANGELOG.md Co-authored-by: Foti Dim <foti@navideck.com> --------- Co-authored-by: Foti Dim <fdimanidis@gmail.com> Co-authored-by: Foti Dim <foti@navideck.com>
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
|
||||
[](https://pub.dev/packages/universal_ble)
|
||||
|
||||
A cross-platform (Android/iOS/macOS/Windows/Linux/Web) Bluetooth Low Energy (BLE) plugin for Flutter
|
||||
A cross-platform (Android/iOS/macOS/Windows/Linux/Web) Bluetooth Low Energy (BLE) plugin for Flutter.
|
||||
|
||||
[Try it online](https://navideck.github.io/universal_ble/), provided your browser supports [Web Bluetooth](https://caniuse.com/web-bluetooth).
|
||||
|
||||
## Features
|
||||
|
||||
@@ -16,29 +18,31 @@ A cross-platform (Android/iOS/macOS/Windows/Linux/Web) Bluetooth Low Energy (BLE
|
||||
### API Support Matrix
|
||||
|
||||
| API | Android | iOS | macOS | Windows (beta) | Linux (beta) | Web |
|
||||
| :------------------- | :-----: | :-: | :---: | :-----: | :---: | :-: |
|
||||
| startScan/stopScan | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| connect/disconnect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| getConnectedDevices | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ❌ |
|
||||
| discoverServices | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| readValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| writeValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| setNotifiable | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| pair/unPair | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ❌ |
|
||||
| onPairingStateChange | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ❌ |
|
||||
| enableBluetooth | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ❌ |
|
||||
| onAvailabilityChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| requestMtu | ✔️ | ✔️ | ✔️ | ✔️ | 🚧 | ❌ |
|
||||
| :------------------- | :-----: | :-: | :---: | :------------: | :----------: | :-: |
|
||||
| startScan/stopScan | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| connect/disconnect | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| getConnectedDevices | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ❌ |
|
||||
| discoverServices | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| readValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| writeValue | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| setNotifiable | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| pair/unPair | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ❌ |
|
||||
| onPairingStateChange | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ❌ |
|
||||
| enableBluetooth | ✔️ | ❌ | ❌ | ✔️ | ✔️ | ❌ |
|
||||
| onAvailabilityChange | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
|
||||
| requestMtu | ✔️ | ✔️ | ✔️ | ✔️ | 🚧 | ❌ |
|
||||
|
||||
## Getting Started
|
||||
|
||||
Add universal_ble in your pubspec.yaml:
|
||||
|
||||
```yaml
|
||||
dependencies:
|
||||
universal_ble:
|
||||
```
|
||||
|
||||
and import it wherever you want to use it:
|
||||
|
||||
```dart
|
||||
import 'package:universal_ble/universal_ble.dart';
|
||||
```
|
||||
@@ -188,4 +192,7 @@ UniversalBle.startScan(
|
||||
// Create a class that extends UniversalBlePlatform
|
||||
class UniversalBleMock extends UniversalBlePlatform {
|
||||
// Implement all methods
|
||||
}
|
||||
}
|
||||
|
||||
UniversalBle.setInstance(UniversalBleMock());
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user