Files
ai-contract-platform/mobile/lib/app/theme/app_theme.dart
T
yuqei 3df85fdb04 feat: land phase15 legal docs and commercial ops
Includes legal document generation workflows, prompt governance runtime wiring, legal change impact scans, operation KPI dashboards, invoice files, sales follow-up events, mobile review polish, deployment automation, and updated project docs.
2026-05-21 14:42:44 +08:00

169 lines
5.5 KiB
Dart

import 'package:flutter/material.dart';
import 'brand_assets.dart';
class AppTheme {
const AppTheme._();
static ThemeData light() {
const textColor = BrandAssets.ink;
final colorScheme = ColorScheme.fromSeed(
seedColor: BrandAssets.brand,
brightness: Brightness.light,
).copyWith(
primary: BrandAssets.brand,
secondary: BrandAssets.mint,
tertiary: BrandAssets.accentAmber,
surface: BrandAssets.surface,
surfaceContainerHighest: BrandAssets.surfaceSoft,
outline: BrandAssets.line,
error: BrandAssets.accentCoral,
);
return ThemeData(
colorScheme: colorScheme,
scaffoldBackgroundColor: BrandAssets.canvas,
useMaterial3: true,
appBarTheme: const AppBarTheme(
centerTitle: false,
backgroundColor: BrandAssets.surfaceInk,
foregroundColor: Colors.white,
elevation: 0,
scrolledUnderElevation: 0,
),
cardTheme: CardThemeData(
color: BrandAssets.surface,
elevation: 0,
shadowColor: const Color(0x0E0F172A),
surfaceTintColor: Colors.transparent,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(BrandAssets.radius),
side: const BorderSide(color: BrandAssets.line),
),
),
filledButtonTheme: FilledButtonThemeData(
style: FilledButton.styleFrom(
backgroundColor: BrandAssets.brand,
foregroundColor: Colors.white,
disabledBackgroundColor: const Color(0xFFD8E1DE),
disabledForegroundColor: BrandAssets.muted,
minimumSize: const Size(48, 48),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(BrandAssets.radius),
),
textStyle: const TextStyle(
fontWeight: FontWeight.w800,
letterSpacing: 0,
),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
foregroundColor: BrandAssets.ink,
minimumSize: const Size(48, 46),
side: const BorderSide(color: BrandAssets.lineStrong),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(BrandAssets.radius),
),
textStyle: const TextStyle(fontWeight: FontWeight.w800),
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: BrandAssets.primaryDark,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(BrandAssets.radius),
),
textStyle: const TextStyle(fontWeight: FontWeight.w800),
),
),
textTheme: const TextTheme(
titleLarge: TextStyle(
color: textColor,
fontSize: 22,
fontWeight: FontWeight.w700,
),
titleMedium: TextStyle(
color: textColor,
fontSize: 18,
fontWeight: FontWeight.w700,
),
titleSmall: TextStyle(
color: textColor,
fontSize: 15,
fontWeight: FontWeight.w600,
),
bodyLarge: TextStyle(
color: textColor,
fontSize: 15,
height: 1.5,
),
bodyMedium: TextStyle(
color: BrandAssets.muted,
fontSize: 14,
height: 1.5,
),
bodySmall: TextStyle(
color: BrandAssets.muted,
fontSize: 12.5,
height: 1.45,
),
labelLarge: TextStyle(
color: textColor,
fontSize: 13,
fontWeight: FontWeight.w800,
),
labelMedium: TextStyle(
color: BrandAssets.muted,
fontSize: 11.5,
fontWeight: FontWeight.w700,
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: BrandAssets.surface,
hintStyle: const TextStyle(color: BrandAssets.muted),
contentPadding:
const EdgeInsets.symmetric(horizontal: 14, vertical: 14),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(BrandAssets.radius),
borderSide: const BorderSide(color: BrandAssets.line),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(BrandAssets.radius),
borderSide: const BorderSide(color: BrandAssets.line),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(BrandAssets.radius),
borderSide: const BorderSide(color: BrandAssets.brand, width: 1.5),
),
),
navigationBarTheme: const NavigationBarThemeData(
backgroundColor: BrandAssets.surface,
indicatorColor: Color(0xFFE8FBDC),
surfaceTintColor: Colors.transparent,
elevation: 0,
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
),
segmentedButtonTheme: SegmentedButtonThemeData(
style: ButtonStyle(
padding: const WidgetStatePropertyAll<EdgeInsetsGeometry>(
EdgeInsets.symmetric(horizontal: 14, vertical: 12),
),
shape: WidgetStatePropertyAll<OutlinedBorder>(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(BrandAssets.radius)),
),
side: const WidgetStatePropertyAll<BorderSide>(
BorderSide(color: BrandAssets.lineStrong),
),
textStyle: const WidgetStatePropertyAll<TextStyle>(
TextStyle(fontWeight: FontWeight.w800),
),
),
),
);
}
}