Line data Source code
1 : import 'package:flutter_chrome_cast/entities/discovery_criteria.dart';
2 : import 'package:flutter_chrome_cast/entities/cast_options.dart';
3 :
4 : /// iOS-specific Google Cast options.
5 : ///
6 : /// This class extends [GoogleCastOptions] to provide additional configuration
7 : /// for iOS, such as specifying discovery criteria for Cast devices.
8 : class IOSGoogleCastOptions extends GoogleCastOptions {
9 : /// The discovery criteria used to find Cast devices on iOS.
10 : final GoogleCastDiscoveryCriteriaInitialize _discoveryCriteria;
11 :
12 : /// Creates an instance of [IOSGoogleCastOptions] with the given [discoveryCriteria].
13 0 : IOSGoogleCastOptions(this._discoveryCriteria);
14 :
15 : /// Converts this iOS Cast options object to a map representation.
16 : ///
17 : /// The returned map includes all base options and the iOS-specific discovery criteria.
18 0 : @override
19 : Map<String, dynamic> toMap() {
20 0 : return super.toMap()
21 0 : ..addAll(
22 0 : {
23 0 : 'discoveryCriteria': _discoveryCriteria.toMap(),
24 : },
25 : );
26 : }
27 : }
|