From a10f2d9d190e8723426f2684be35b40b932116d1 Mon Sep 17 00:00:00 2001 From: treetips Date: Tue, 1 Sep 2026 21:10:20 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=83=8C=E6=99=AF=E7=94=BB=E5=83=8F?= =?UTF-8?q?=E3=81=AE=E4=B8=8D=E9=80=8F=E6=98=8E=E5=BA=A6=E3=82=92=20AppCon?= =?UTF-8?q?stants=20=E3=81=A7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AppConstants.wallpaperOpacity (0.0〜1.0) を追加 - HomeShell の LiquidGlassView 背景を Opacity でラップし、定数を適用 --- lib/app/home_shell.dart | 13 ++++++++----- lib/core/constants/app_constants.dart | 6 ++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/app/home_shell.dart b/lib/app/home_shell.dart index 1696f32..934c102 100644 --- a/lib/app/home_shell.dart +++ b/lib/app/home_shell.dart @@ -28,11 +28,14 @@ class _HomeShellState extends State { final l10n = AppLocalizations.of(context)!; return Scaffold( body: LiquidGlassView( - backgroundWidget: Image.asset( - AppConstants.wallpaperAsset, - fit: BoxFit.cover, - errorBuilder: (context, error, stackTrace) => - const ColoredBox(color: Color(0xFF1A1A2E)), + backgroundWidget: Opacity( + opacity: AppConstants.wallpaperOpacity, + child: Image.asset( + AppConstants.wallpaperAsset, + fit: BoxFit.cover, + errorBuilder: (context, error, stackTrace) => + const ColoredBox(color: Color(0xFF1A1A2E)), + ), ), realTimeCapture: false, child: Stack( diff --git a/lib/core/constants/app_constants.dart b/lib/core/constants/app_constants.dart index 879b2e9..4b16487 100644 --- a/lib/core/constants/app_constants.dart +++ b/lib/core/constants/app_constants.dart @@ -51,4 +51,10 @@ class AppConstants { /// `assets/images/` 配下の壁紙画像を指定する。変更時は `pubspec.yaml` の /// `flutter.assets` も合わせて更新すること。 static const String wallpaperAsset = 'assets/images/wallpaper3.jpg'; + + /// 壁紙の不透明度 (0.0: 透明 〜 1.0: 不透明)。 + /// + /// `HomeShell` の背景画像に適用される。値を下げると壁紙が薄くなり、 + /// Liquid Glass の視認性が上がる。 + static const double wallpaperOpacity = 1.0; }