style: 统一全站深色视觉

This commit is contained in:
Zhou Weidong committed 2026-10-22 22:01:36 +08:00
1 parent 86aa7e0f4f
commit 37e35f4b47
24 files changed
+134 -130

No files matched your search

+15 -11
View File
@@ -3,6 +3,7 @@
import 'package:flutter/material.dart';
import '../theme/app_colors.dart';
import '../theme/app_theme.dart';
import 'subpage_header.dart';
/// 二级页面通用骨架:返回栏 + 标题/副标题 + 可滚动内容,无底部导航。
@@ -27,17 +28,20 @@ class PlainPageScaffold extends StatelessWidget {
return Scaffold(
key: pageKey,
backgroundColor: AppColors.ink,
body: SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppSubpageHeader(
title: title,
subtitle: subtitle,
backKey: backKey,
),
Expanded(child: child),
],
body: DecoratedBox(
decoration: const BoxDecoration(gradient: AppTheme.pageGradient),
child: SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
AppSubpageHeader(
title: title,
subtitle: subtitle,
backKey: backKey,
),
Expanded(child: child),
],
),
),
),
);
+14 -22
View File
@@ -14,9 +14,7 @@ const double _subtitleFontSize = 12;
const double _actionGap = 8;
const double _iconSize = 22;
const double _iconWeight = 600;
const double _borderWidth = 1;
const double _shadowBlur = 8;
const Offset _lightShadowOffset = Offset(0, 2);
/// 二级页面统一圆形操作按钮,返回、分享和更多共用同一尺寸与表面样式。
class AppSubpageCircleButton extends StatelessWidget {
@@ -47,24 +45,18 @@ class AppSubpageCircleButton extends StatelessWidget {
key: const Key('subpage-back-shadow'),
decoration: BoxDecoration(
shape: BoxShape.circle,
boxShadow: [
BoxShadow(
color: dark ? AppColors.shadowSoft : AppColors.shadowSubtle,
blurRadius: _shadowBlur,
offset: dark ? Offset.zero : _lightShadowOffset,
),
],
boxShadow: dark
? const [
BoxShadow(
color: AppColors.shadowSoft,
blurRadius: _shadowBlur,
),
]
: const [],
),
child: Material(
color: dark ? AppColors.headerScrim : AppColors.card,
shape: CircleBorder(
side: dark
? BorderSide.none
: const BorderSide(
color: AppColors.border,
width: _borderWidth,
),
),
color: dark ? AppColors.headerScrim : AppColors.transparent,
shape: const CircleBorder(),
clipBehavior: Clip.antiAlias,
child: InkWell(
customBorder: const CircleBorder(),
@@ -72,7 +64,7 @@ class AppSubpageCircleButton extends StatelessWidget {
child: Center(
child: Icon(
icon,
color: AppColors.onSurface,
color: dark ? AppColors.onSurface : AppColors.textPrimary,
size: _iconSize,
weight: _iconWeight,
),
@@ -85,7 +77,7 @@ class AppSubpageCircleButton extends StatelessWidget {
}
}
/// 二级页面统一返回按钮,浅色页使用白底描边,深色页使用半透明黑底。
/// 二级页面统一返回按钮,普通页透明,沉浸页使用半透明黑底。
class AppSubpageBackButton extends StatelessWidget {
const AppSubpageBackButton({
super.key,
@@ -133,8 +125,8 @@ class AppSubpageHeader extends StatelessWidget {
@override
Widget build(BuildContext context) {
final foreground = AppColors.onSurface;
final secondary = AppColors.muted;
final foreground = AppColors.textPrimary;
final secondary = AppColors.textSecondary;
return SizedBox(
key: const Key('subpage-header'),
height: subtitle == null ? _height : _heightWithSubtitle,