只保留Android支持

This commit is contained in:
2026-08-14 21:39:39 +08:00
parent 36e434b8b5
commit b997391500
52 changed files with 633 additions and 1328 deletions
+24
View File
@@ -0,0 +1,24 @@
import 'package:flutter/material.dart';
import '../models/song_model.dart';
// 这是一个 ChangeNotifier,以后用来刷新底部的迷你播放条
class AudioService extends ChangeNotifier {
Song? _currentSong;
bool _isPlaying = false;
Song? get currentSong => _currentSong;
bool get isPlaying => _isPlaying;
// 占位方法:以后这里会调用 media_kit
void playSong(Song song) {
_currentSong = song;
_isPlaying = true;
notifyListeners(); // 刷新 UI
print('🎵 准备播放: ${song.title} - ${song.artist}');
}
void togglePlay() {
_isPlaying = !_isPlaying;
notifyListeners();
}
}