feat: 长辈模式(大字大按钮 + 偏好按账号隔离)+ 语音输入(按住说话 + 实时转写 + 后端代理 DashScope ASR + 患者端专用)+ 健康仪表盘背景渐变
This commit is contained in:
@@ -776,6 +776,74 @@ class AppTheme {
|
||||
),
|
||||
);
|
||||
|
||||
/// 长辈模式只在已登录的患者端启用。这里提高主题级控件尺寸,页面中写死的
|
||||
/// 字号再由 ElderModeScope 提供的文本缩放统一兜底。
|
||||
static ThemeData get elderLightTheme {
|
||||
final base = lightTheme;
|
||||
return base.copyWith(
|
||||
appBarTheme: base.appBarTheme.copyWith(
|
||||
toolbarHeight: 60,
|
||||
titleTextStyle: const TextStyle(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: text,
|
||||
),
|
||||
iconTheme: const IconThemeData(size: 28, color: text),
|
||||
),
|
||||
textTheme: base.textTheme.copyWith(
|
||||
headlineLarge: const TextStyle(
|
||||
fontSize: 28,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: text,
|
||||
),
|
||||
titleLarge: const TextStyle(
|
||||
fontSize: 22,
|
||||
fontWeight: FontWeight.w700,
|
||||
color: text,
|
||||
),
|
||||
titleMedium: const TextStyle(
|
||||
fontSize: 19,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: text,
|
||||
),
|
||||
bodyLarge: const TextStyle(fontSize: 18, color: text, height: 1.5),
|
||||
bodyMedium: const TextStyle(fontSize: 16, color: textSub, height: 1.45),
|
||||
labelMedium: const TextStyle(fontSize: 16, color: textSub),
|
||||
labelSmall: const TextStyle(fontSize: 15, color: textHint),
|
||||
),
|
||||
inputDecorationTheme: base.inputDecorationTheme.copyWith(
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 18,
|
||||
vertical: 16,
|
||||
),
|
||||
hintStyle: const TextStyle(color: textHint, fontSize: 17),
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primary,
|
||||
foregroundColor: Colors.white,
|
||||
minimumSize: const Size(double.infinity, 56),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(rLg),
|
||||
),
|
||||
textStyle: const TextStyle(fontSize: 18, fontWeight: FontWeight.w700),
|
||||
elevation: 0,
|
||||
),
|
||||
),
|
||||
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: text,
|
||||
minimumSize: const Size(52, 56),
|
||||
side: const BorderSide(color: border),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(rMd),
|
||||
),
|
||||
textStyle: const TextStyle(fontSize: 18, fontWeight: FontWeight.w700),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static ShadThemeData get shadTheme => ShadThemeData(
|
||||
brightness: Brightness.light,
|
||||
colorScheme: ShadVioletColorScheme.light(
|
||||
|
||||
Reference in New Issue
Block a user