From baffb9816ce4d6d7e4c6c38557ae1d0396694b46 Mon Sep 17 00:00:00 2001 From: Prerak Mann Date: Mon, 15 Jul 2019 19:21:22 +0530 Subject: [PATCH] released 0.1.1 --- CHANGELOG.md | 8 +++++++ .../NearbyConnectionsPlugin.java | 2 +- example/pubspec.lock | 14 +++++------ lib/nearby_connections.dart | 23 +++++++++---------- pubspec.lock | 12 +++++----- pubspec.yaml | 4 ++-- 6 files changed, 35 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af4df92..d403539 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.1.1 + +* Fixed sendPayload future not completing bug + +## 0.1.0 + +* Added pub maintanence suggestions + ## 0.0.2 * Added dartdoc comments diff --git a/android/src/main/java/com/pkmnapps/nearby_connections/NearbyConnectionsPlugin.java b/android/src/main/java/com/pkmnapps/nearby_connections/NearbyConnectionsPlugin.java index c16b379..8fd4ec5 100644 --- a/android/src/main/java/com/pkmnapps/nearby_connections/NearbyConnectionsPlugin.java +++ b/android/src/main/java/com/pkmnapps/nearby_connections/NearbyConnectionsPlugin.java @@ -218,7 +218,7 @@ public class NearbyConnectionsPlugin implements MethodCallHandler { assert bytes != null; Nearby.getConnectionsClient(activity).sendPayload(endpointId, Payload.fromBytes(bytes)); Log.d("NearbyCon java", "sentPayload"); - + result.success(true); break; } default: diff --git a/example/pubspec.lock b/example/pubspec.lock index 4977df0..100cb89 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -1,5 +1,5 @@ # Generated by pub -# See https://www.dartlang.org/tools/pub/glossary#lockfile +# See https://dart.dev/tools/pub/glossary#lockfile packages: async: dependency: transitive @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.2.0" boolean_selector: dependency: transitive description: @@ -66,7 +66,7 @@ packages: path: ".." relative: true source: path - version: "0.0.2" + version: "0.1.1" path: dependency: transitive description: @@ -80,14 +80,14 @@ packages: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.7.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3" sky_engine: dependency: transitive description: flutter @@ -134,7 +134,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.4" + version: "0.2.5" typed_data: dependency: transitive description: @@ -150,4 +150,4 @@ packages: source: hosted version: "2.0.8" sdks: - dart: ">=2.2.0 <3.0.0" + dart: ">=2.2.2 <3.0.0" diff --git a/lib/nearby_connections.dart b/lib/nearby_connections.dart index b9b4862..565d8b4 100644 --- a/lib/nearby_connections.dart +++ b/lib/nearby_connections.dart @@ -120,9 +120,8 @@ class Nearby { _onPayloadReceived?.call(endpointId, bytes); break; - default: - return null; } + return null; }); } @@ -271,8 +270,8 @@ class Nearby { /// /// Call this in [OnConnctionInitiated] /// to accept an incoming connection - /// - /// [OnConnectionResult] is called on both + /// + /// [OnConnectionResult] is called on both /// only if both of them accept the connection Future acceptConnection( String endpointId, { @@ -294,9 +293,9 @@ class Nearby { /// /// Call this in [OnConnctionInitiated] /// to reject an incoming connection - /// - /// [OnConnectionResult] is called on both - /// even if one of them rejects the connection + /// + /// [OnConnectionResult] is called on both + /// even if one of them rejects the connection Future rejectConnection(String endpointId) async { return await _channel.invokeMethod( 'rejectConnection', @@ -307,9 +306,9 @@ class Nearby { } /// Send bytes [Uint8List] payload to endpoint - /// + /// /// Convert String to Uint8List as follows - /// + /// /// ```dart /// String a = "hello"; /// Uint8List bytes = Uint8List.fromList(a.codeUnits); @@ -326,11 +325,11 @@ class Nearby { } /// ConnectionInfo class -/// +/// /// Its a parameter in [OnConnctionInitiated] -/// +/// /// [endPointName] is userNickName of requester -/// +/// /// [authenticationToken] is useful to check the connection security /// it must be same on both devices class ConnectionInfo { diff --git a/pubspec.lock b/pubspec.lock index a1e8431..7642229 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,5 +1,5 @@ # Generated by pub -# See https://www.dartlang.org/tools/pub/glossary#lockfile +# See https://dart.dev/tools/pub/glossary#lockfile packages: async: dependency: transitive @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.2.0" boolean_selector: dependency: transitive description: @@ -66,14 +66,14 @@ packages: name: pedantic url: "https://pub.dartlang.org" source: hosted - version: "1.5.0" + version: "1.7.0" quiver: dependency: transitive description: name: quiver url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.3" sky_engine: dependency: transitive description: flutter @@ -120,7 +120,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.4" + version: "0.2.5" typed_data: dependency: transitive description: @@ -136,4 +136,4 @@ packages: source: hosted version: "2.0.8" sdks: - dart: ">=2.2.0 <3.0.0" + dart: ">=2.2.2 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index c7fb5e2..1b8703f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: nearby_connections -description: A Flutter plugin for the android NearbyConnections API. -version: 0.0.2 +description: Plugin for the android NearbyConnections API. Currently sending bytes (Uint8List) is possible. +version: 0.1.1 author: Prerak Mann homepage: https://github.com/mannprerak2/nearby_connections