requestDiscoverable method

Future<int> requestDiscoverable (
  1. int durationInSeconds
)

Asks for discoverable mode (probably always prompt for user interaction in fact). Returns number of seconds acquired or zero if canceled or failed gracefully.

Duration might be capped to 120, 300 or 3600 seconds on some devices.

Implementation

Future<int> requestDiscoverable(int durationInSeconds) async =>
    await _methodChannel
        .invokeMethod("requestDiscoverable", {"duration": durationInSeconds});