fix: 新增页面背景跟随主题(无壁纸时不再黑底,有壁纸保持透明)
This commit is contained in:
1 parent
3362c8e165
commit
d5f85c01c2
5 files changed
+15
-5
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import 'dart:async';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../providers/wallpaper_provider.dart';
|
||||
import '../../app.dart' show navigatorKey;
|
||||
import '../../providers/rcon_provider.dart';
|
||||
import '../../providers/server_provider.dart';
|
||||
@@ -107,10 +108,11 @@ class _DashboardPageState extends State<DashboardPage> {
|
||||
final servers = context.watch<ServerProvider>().servers;
|
||||
final holder = context.watch<SelectedServerHolder>();
|
||||
final selected = holder.server ?? (servers.isNotEmpty ? servers.first : null);
|
||||
final hasWallpaper = context.watch<WallpaperProvider>().hasWallpaper;
|
||||
final status = selected != null ? _status[selected.id] : null;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundColor: hasWallpaper ? Colors.transparent : null,
|
||||
appBar: AppBar(
|
||||
title: const Text('ZV Manager'),
|
||||
actions: [
|
||||
|
||||
Reference in new issue
Block a user