MethodChannelChromeCast class

An implementation of ChromeCastPlatform that uses MethodChannel to communicate with the native code.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addSessionListener({int? id}) Future<void>
Add listener for receive callbacks.
override
buildView(Map<String, dynamic> arguments, PlatformViewCreatedCallback onPlatformViewCreated) Widget
Returns a widget displaying the button.
override
channel(int? id) MethodChannel?
Accesses the MethodChannel associated to the passed id.
disableTracks({required int id}) Future<void>
Disable current active subtitle track
override
duration({required int id}) Future<Duration>
override
endSession({required int id}) Future<void>
End current session
override
getVolume({required int id}) Future<double>
Get volume
override
init(int id) Future<void>
Initializes the platform interface with id.
override
isConnected({required int id}) Future<bool?>
Returns true when a cast session is connected, false otherwise.
override
isPlaying({required int id}) Future<bool?>
Returns true when a cast session is playing, false otherwise.
override
loadMedia({required int id, required String url, required double position, required bool autoplay, required String title, required String description, required String image, required ChromeCastMediaType type, List<ChromeCastSubtitle>? subtitles, int? showSeason, int? showEpisode}) Future<void>
Load a new media by providing an url.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onRequestCompleted({int? id}) Stream<RequestDidCompleteEvent>
A request has completed.
override
onRequestFailed({int? id}) Stream<RequestDidFailEvent>
A request has failed.
override
onSessionEnded({int? id}) Stream<SessionEndedEvent>
A session is ended.
override
onSessionEnding({int? id}) Stream<SessionEndingEvent>
A session has started to end.
override
onSessionStarted({int? id}) Stream<SessionStartedEvent>
A session is started.
override
pause({required int id}) Future<void>
Pauses the video playback.
override
play({required int id}) Future<void>
Plays the video playback.
override
position({required int id}) Future<Duration>
override
removeSessionListener({int? id}) Future<void>
Remove listener for receive callbacks.
override
seek(bool relative, double interval, {required int id}) Future<void>
If relative is set to false sets the video position to an interval from the start.
override
setVolume(double volume, {required int id}) Future<void>
Set volume
override
stop({int? id}) Future<void>
Stop the current video.
override
toString() String
A string representation of this object.
inherited
updateTracks({required int id, required double subId}) Future<void>
Update Subtitle Track
override

Operators

operator ==(Object other) bool
The equality operator.
inherited