PlayerctlService class
Facade service that provides a unified interface to all playerctl operations Follows Facade Pattern and Dependency Inversion Principle
This class delegates to specialized services, each with a single responsibility
Constructors
- PlayerctlService()
- Default constructor - creates all dependencies
- PlayerctlService.withDependencies({required PlayerctlCommandExecutor commandExecutor, required PlayerctlSystemChecker systemChecker, required PlayerDetector playerDetector, required MetadataProvider metadataProvider, required PlaybackController playbackController, required VolumeController volumeController})
- Constructor with dependency injection for testing Follows Dependency Inversion Principle
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
-
cycleLoop(
[String? player]) → Future< bool> -
decreaseVolume(
int percentage, [String? player]) → Future< bool> -
dispose(
) → void - Cleanup all resources
-
ensurePlayerctlInstalled(
) → Future< void> -
executeCommand(
String command, [String? player]) → Future< bool> -
override
-
getActivePlayerName(
) → Future< String?> -
getAvailablePlayers(
) → Future< List< String> > -
override
-
getCurrentMetadata(
[String? player]) → Future< Map< String, String> > -
override
-
getLoop(
[String? player]) → Future< String?> -
getPlayerctlVersion(
) → Future< String?> -
override
-
getPosition(
[String? player]) → Future< int?> -
getShuffle(
[String? player]) → Future< String?> -
getVolume(
[String? player]) → Future< int?> -
override
-
hasActivePlayer(
) → Future< bool> -
override
-
increaseVolume(
int percentage, [String? player]) → Future< bool> -
isPlayerAvailable(
String playerName) → Future< bool> -
isPlayerctlInstalled(
) → Future< bool> -
override
-
listenToMetadata(
[String? player]) → Stream< Map< String, String> > -
override
-
mute(
[String? player]) → Future< bool> -
next(
[String? player]) → Future< bool> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
[String? player]) → Future< bool> -
override
-
play(
[String? player]) → Future< bool> -
override
-
playPause(
[String? player]) → Future< bool> -
override
-
previous(
[String? player]) → Future< bool> -
override
-
seek(
int offsetMicroseconds, [String? player]) → Future< bool> -
seekBackward(
int seconds, [String? player]) → Future< bool> -
seekForward(
int seconds, [String? player]) → Future< bool> -
seekTo(
int positionMicroseconds, [String? player]) → Future< bool> -
setLoop(
String status, [String? player]) → Future< bool> -
setShuffle(
String status, [String? player]) → Future< bool> -
setVolume(
int volume, [String? player]) → Future< bool> -
override
-
stop(
[String? player]) → Future< bool> -
override
-
stopListening(
) → Future< void> -
override
-
toggleShuffle(
[String? player]) → Future< bool> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited