fix: 新增页面背景跟随主题(无壁纸时不再黑底,有壁纸保持透明)
This commit is contained in:
1 parent
3362c8e165
commit
d5f85c01c2
5 files changed
+15
-5
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../providers/wallpaper_provider.dart';
|
||||
import '../../core/services/modrinth_api.dart';
|
||||
import '../../providers/download_provider.dart';
|
||||
import '../../core/services/download_manager.dart';
|
||||
@@ -60,10 +61,11 @@ class _DownloadPageState extends State<DownloadPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final dp = context.read<DownloadProvider>();
|
||||
final hasWallpaper = context.watch<WallpaperProvider>().hasWallpaper;
|
||||
return DefaultTabController(
|
||||
length: 2,
|
||||
child: Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
backgroundColor: hasWallpaper ? Colors.transparent : null,
|
||||
appBar: AppBar(
|
||||
title: const Text('下载中心'),
|
||||
actions: [
|
||||
|
||||
Reference in new issue
Block a user