startSessionWithDevice method

  1. @override
Future<bool> startSessionWithDevice(
  1. GoogleCastDevice device
)
override

Starts a new session with the given device, using the default session options that were registered for the device category, if any. This is an asynchronous operation. Parameters device The device to use for this session. Returns YES if the operation has been started successfully, NO if there is a session currently established or if the operation could not be started.

Implementation

@override
Future<bool> startSessionWithDevice(GoogleCastDevice device) async {
  device as GoogleCastAndroidDevice;
  return (await _channel.invokeMethod(
        'startSessionWithDeviceId',
        device.deviceID,
      )) ==
      true;
}