setSharedInstanceWithOptions method

  1. @override
Future<bool> setSharedInstanceWithOptions(
  1. GoogleCastOptions castOptions
)
override

Initializes the shared Google Cast context with the provided options.

castOptions contains the configuration options for the Cast context. Returns true if the initialization was successful, false otherwise.

Implementation

@override
Future<bool> setSharedInstanceWithOptions(
    GoogleCastOptions castOptions) async {
  try {
    final result =
        await _channel.invokeMethod('setSharedInstance', castOptions.toMap());
    return result == true;
  } catch (e) {
    rethrow;
  }
}