Files
ai-contract-platform/mobile/lib/app/theme/app_theme.dart
T

117 lines
3.4 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,
surface: Colors.white,
outline: BrandAssets.line,
);
return ThemeData(
colorScheme: colorScheme,
scaffoldBackgroundColor: BrandAssets.canvas,
useMaterial3: true,
appBarTheme: const AppBarTheme(
centerTitle: false,
backgroundColor: Colors.transparent,
foregroundColor: textColor,
elevation: 0,
),
cardTheme: CardThemeData(
color: Colors.white,
elevation: 0,
surfaceTintColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: const BorderSide(color: BrandAssets.line),
),
),
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: 12.5,
fontWeight: FontWeight.w700,
),
labelMedium: TextStyle(
color: BrandAssets.muted,
fontSize: 11.5,
fontWeight: FontWeight.w600,
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: Colors.white,
hintStyle: const TextStyle(color: BrandAssets.muted),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: const BorderSide(color: BrandAssets.line),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: const BorderSide(color: BrandAssets.line),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: const BorderSide(color: BrandAssets.brand, width: 1.5),
),
),
navigationBarTheme: const NavigationBarThemeData(
backgroundColor: Colors.white,
indicatorColor: Color(0xFFE0F7F4),
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
),
segmentedButtonTheme: SegmentedButtonThemeData(
style: ButtonStyle(
padding: const WidgetStatePropertyAll<EdgeInsetsGeometry>(
EdgeInsets.symmetric(horizontal: 14, vertical: 12),
),
textStyle: const WidgetStatePropertyAll<TextStyle>(
TextStyle(fontWeight: FontWeight.w600),
),
),
),
);
}
}