From db7eeabef6fc273886233f8d12dfe14ac05d434b Mon Sep 17 00:00:00 2001 From: Prerak Mann Date: Wed, 28 Aug 2019 20:42:45 +0530 Subject: [PATCH] updated dartdocs, Published 1.0.2+1 --- CHANGELOG.md | 4 ++++ README.md | 4 ++-- example/pubspec.lock | 2 +- lib/src/nearby_connections.dart | 13 ++++++++++--- pubspec.yaml | 2 +- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d9e169..d8a5847 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.2+1 + +* Updated dartdoc and Readme + ## 1.0.2 * Added payload cancellation and other assertions diff --git a/README.md b/README.md index 12867e9..f930dcb 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/example/pubspec.lock b/example/pubspec.lock index fb2d464..228a235 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -73,7 +73,7 @@ packages: path: ".." relative: true source: path - version: "1.0.2" + version: "1.0.2+1" path: dependency: transitive description: diff --git a/lib/src/nearby_connections.dart b/lib/src/nearby_connections.dart index 8267387..22017c0 100644 --- a/lib/src/nearby_connections.dart +++ b/lib/src/nearby_connections.dart @@ -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 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 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 sendBytesPayload(String endpointId, Uint8List bytes) async { assert(endpointId != null); @@ -374,6 +380,7 @@ class Nearby { ); } + /// Use it to cancel/stop a payload transfer Future cancelPayload(int payloadId) async { assert(payloadId != null); diff --git a/pubspec.yaml b/pubspec.yaml index 79208e2..3f3cec9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 homepage: https://github.com/mannprerak2/nearby_connections