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

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