updated dartdocs, Published 1.0.2+1

This commit is contained in:
Prerak Mann 2019-08-28 20:42:45 +05:30
parent 2e38f3ab3b
commit db7eeabef6
5 changed files with 18 additions and 7 deletions

View File

@ -1,3 +1,7 @@
## 1.0.2+1
* Updated dartdoc and Readme
## 1.0.2
* Added payload cancellation and other assertions

View File

@ -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)

View File

@ -73,7 +73,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.0.2"
version: "1.0.2+1"
path:
dependency: transitive
description:

View File

@ -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);

View File

@ -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