现在webdav链接跑通了,准备优化界面逻辑
This commit is contained in:
+7
-8
@@ -7,8 +7,13 @@ import 'pages/home_page.dart';
|
||||
|
||||
void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
// media_kit 不需要静态 init,PlaybackService 中会初始化 Player
|
||||
|
||||
// ✅ 关键:必须在调用任何 media_kit API 之前执行
|
||||
MediaKit.ensureInitialized();
|
||||
|
||||
// 现在可以安全地初始化 PlaybackService
|
||||
PlaybackService().init();
|
||||
|
||||
runApp(
|
||||
ChangeNotifierProvider(
|
||||
create: (_) => AudioService(),
|
||||
@@ -30,15 +35,9 @@ class QTPlayerApp extends StatelessWidget {
|
||||
colorScheme: const ColorScheme.dark(
|
||||
primary: Color(0xFF7C9A9E),
|
||||
secondary: Color(0xFFB8D4D0),
|
||||
surface: Color(0xFF1A1F1E), // 替代 background
|
||||
// 用 onSurface 控制文字颜色
|
||||
surface: Color(0xFF1A1F1E),
|
||||
onSurface: Colors.white,
|
||||
),
|
||||
appBarTheme: const AppBarTheme(
|
||||
backgroundColor: Color(0xFF1A1F1E),
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
),
|
||||
useMaterial3: true,
|
||||
),
|
||||
home: const HomePage(),
|
||||
|
||||
Reference in New Issue
Block a user