connect abstract method

Future<bool> connect(
  1. NearbyDevice device
)

Connects to passed device using a platform-specific service.

Note that the NearbyIOSService implementation invites or accepts invite depending on the NearbyIOSService.isBrowser.

Note that if Platform.isIOS == true, NearbyIOSDevice should be passed. If Platform.isAndroid == true, NearbyAndroidDevice should be passed.

On Android can throw mapped from native platform exceptions:

  1. NearbyServiceBusyException
  2. NearbyServiceP2PUnsupportedException
  3. NearbyServiceNoServiceRequestsException
  4. NearbyServiceGenericErrorException
  5. NearbyServiceUnknownException

Implementation

Future<bool> connect(NearbyDevice device);