mod: 视频播放器重构 - 基本功能
This commit is contained in:
19
lib/plugin/pl_player/models/play_status.dart
Normal file
19
lib/plugin/pl_player/models/play_status.dart
Normal file
@ -0,0 +1,19 @@
|
||||
import 'package:get/get.dart';
|
||||
|
||||
enum PlayerStatus { completed, playing, paused }
|
||||
|
||||
class PlPlayerStatus {
|
||||
Rx<PlayerStatus> status = Rx(PlayerStatus.paused);
|
||||
|
||||
bool get playing {
|
||||
return status.value == PlayerStatus.playing;
|
||||
}
|
||||
|
||||
bool get paused {
|
||||
return status.value == PlayerStatus.paused;
|
||||
}
|
||||
|
||||
bool get completed {
|
||||
return status.value == PlayerStatus.completed;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user