MethodChannelMediaKeyDetector class

An implementation of MediaKeyDetectorPlatform that uses method channels.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(void listener(MediaKey mediaKey)) → void
Listen for the media key event
inherited
defaultHandler(KeyEvent event) bool
The default handler to use if this platform doesn't need to implement any platform specific code to listen for the media key event
inherited
getIsPlaying() Future<bool>
Get whether the active audio player is currently playing.
override
getPlatformName() Future<String?>
Return the current platform name.
override
initialize() → void
Indicates that the platform should initialize.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeListener(void listener(MediaKey mediaKey)) → void
Remove the previously registered listener
inherited
setIsPlaying({required bool isPlaying}) Future<void>
Set whether the active audio player is currently playing.
override
toString() String
A string representation of this object.
inherited
triggerListeners(MediaKey mediaKey) → void
Trigger all listeners to indicate that the specified media key was pressed
inherited

Operators

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