MediaKeyDetectorPlatform class abstract
The interface that implementations of media_key_detector must implement.
Platform implementations should extend this class
rather than implement it as MediaKeyDetector.
Extending this class (using extends) ensures that the subclass will get
the default implementation, while platform implementations that implements
this interface will be broken by newly added MediaKeyDetectorPlatform
methods.
- Inheritance
-
- Object
- PlatformInterface
- MediaKeyDetectorPlatform
- Implementers
Constructors
- MediaKeyDetectorPlatform()
- Constructs a MediaKeyDetectorPlatform.
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
-
addListener(
void listener(MediaKey mediaKey)) → void - Listen for the media key event
-
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
-
getIsPlaying(
) → Future< bool> - Get whether the active audio player is currently playing.
-
getPlatformName(
) → Future< String?> - Return the current platform name.
-
initialize(
) → void - Indicates that the platform should initialize.
-
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
-
setIsPlaying(
{required bool isPlaying}) → Future< void> - Set whether the active audio player is currently playing.
-
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
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ MediaKeyDetectorPlatform
-
The default instance of MediaKeyDetectorPlatform to use.
getter/setter pair