mirror of
https://github.com/hackku21/nearby_connections.git
synced 2024-10-27 19:14:01 +00:00
updated dartdocs, Published 1.0.2+1
This commit is contained in:
parent
2e38f3ab3b
commit
db7eeabef6
@ -1,3 +1,7 @@
|
||||
## 1.0.2+1
|
||||
|
||||
* Updated dartdoc and Readme
|
||||
|
||||
## 1.0.2
|
||||
|
||||
* Added payload cancellation and other assertions
|
||||
|
@ -1,9 +1,9 @@
|
||||
# nearby_connections
|
||||
|
||||
An **android** flutter plugin for the [Nearby Connections API]((https://developers.google.com/nearby/connections/overview))
|
||||
An **android** flutter plugin for the [Nearby Connections API](https://developers.google.com/nearby/connections/overview)
|
||||
Currently supports Bytes and Files.
|
||||
|
||||
Transfer Data between multiple connected devices using fully offline peer to peer networking.
|
||||
**Transfer Data between multiple connected devices using fully offline peer to peer networking**
|
||||
|
||||
[![pub package](https://img.shields.io/pub/v/nearby_connections.svg)](https://pub.dartlang.org/packages/nearby_connections)
|
||||
|
||||
|
@ -73,7 +73,7 @@ packages:
|
||||
path: ".."
|
||||
relative: true
|
||||
source: path
|
||||
version: "1.0.2"
|
||||
version: "1.0.2+1"
|
||||
path:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -176,7 +176,7 @@ class Nearby {
|
||||
'askExternalStoragePermission',
|
||||
);
|
||||
|
||||
/// Start Advertising
|
||||
/// Start Advertising, Discoverers would be able to discover this advertiser.
|
||||
///
|
||||
/// [userNickName] and [strategy] should not be null
|
||||
Future<bool> startAdvertising(
|
||||
@ -208,7 +208,7 @@ class Nearby {
|
||||
await _channel.invokeMethod('stopAdvertising');
|
||||
}
|
||||
|
||||
/// Start Discovery
|
||||
/// Start Discovery, You will now be able to discover the advertisers now.
|
||||
///
|
||||
/// [userNickName] and [strategy] should not be null
|
||||
Future<bool> startDiscovery(
|
||||
@ -337,12 +337,18 @@ class Nearby {
|
||||
|
||||
/// Send bytes [Uint8List] payload to endpoint
|
||||
///
|
||||
/// Convert String to Uint8List as follows
|
||||
/// Convert String to Uint8List as follows -
|
||||
///
|
||||
/// ```dart
|
||||
/// String a = "hello";
|
||||
/// Uint8List bytes = Uint8List.fromList(a.codeUnits);
|
||||
///
|
||||
/// ```
|
||||
/// Convert bytes [Uint8List] to String as follows -
|
||||
/// ```dart
|
||||
/// String str = String.fromCharCodes(payload.bytes);
|
||||
/// ```
|
||||
///
|
||||
Future<void> sendBytesPayload(String endpointId, Uint8List bytes) async {
|
||||
assert(endpointId != null);
|
||||
|
||||
@ -374,6 +380,7 @@ class Nearby {
|
||||
);
|
||||
}
|
||||
|
||||
/// Use it to cancel/stop a payload transfer
|
||||
Future<void> cancelPayload(int payloadId) async {
|
||||
assert(payloadId != null);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: nearby_connections
|
||||
description: Plugin for the android NearbyConnections API. Bytes and Files Supported.
|
||||
version: 1.0.2
|
||||
version: 1.0.2+1
|
||||
author: Prerak Mann <mannprerak2@gmail.com>
|
||||
homepage: https://github.com/mannprerak2/nearby_connections
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user