Line data Source code
1 : import 'package:flutter_chrome_cast/entities/cast_device.dart';
2 : import 'package:flutter_chrome_cast/enums/connection_state.dart';
3 :
4 : /// Represents a Google Cast session.
5 : abstract class GoogleCastSession {
6 : /// The device associated with this session.
7 : final GoogleCastDevice? device;
8 :
9 : /// The unique session ID.
10 : final String? sessionID;
11 :
12 : /// The current connection state.
13 : final GoogleCastConnectState connectionState;
14 :
15 : /// Whether the current device is muted.
16 : final bool currentDeviceMuted;
17 :
18 : /// The current device volume level.
19 : final double currentDeviceVolume;
20 :
21 : /// The device status text.
22 : final String deviceStatusText;
23 :
24 : /// Creates a new [GoogleCastSession].
25 0 : GoogleCastSession({
26 : required this.device,
27 : required this.sessionID,
28 : required this.connectionState,
29 : required this.currentDeviceMuted,
30 : required this.currentDeviceVolume,
31 : required this.deviceStatusText,
32 : });
33 : }
|