* opt: play status

* opt: comment
This commit is contained in:
My-Responsitories
2025-10-25 14:45:19 +08:00
committed by GitHub
parent 08944241bb
commit ccb61415f5
9 changed files with 133 additions and 260 deletions

View File

@@ -2,18 +2,18 @@ import 'package:get/get.dart';
enum PlayerStatus { completed, playing, paused }
class PlPlayerStatus {
Rx<PlayerStatus> status = Rx(PlayerStatus.paused);
typedef PlPlayerStatus = Rx<PlayerStatus>;
extension PlPlayerStatusExt on PlPlayerStatus {
bool get playing {
return status.value == PlayerStatus.playing;
return value == PlayerStatus.playing;
}
bool get paused {
return status.value == PlayerStatus.paused;
return value == PlayerStatus.paused;
}
bool get completed {
return status.value == PlayerStatus.completed;
return value == PlayerStatus.completed;
}
}