feat: complete kouyu_english app codebase, A0 specifications and .gitignore
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
abstract final class AppColors {
|
||||
static const paper = Color(0xFFF5F7F3);
|
||||
static const surface = Colors.white;
|
||||
static const surfaceMuted = Color(0xFFF1F5F0);
|
||||
static const ink = Color(0xFF19211B);
|
||||
static const muted = Color(0xFF647268);
|
||||
static const line = Color(0xFFD8E1D9);
|
||||
static const green = Color(0xFF176B46);
|
||||
static const softGreen = Color(0xFFE2F3E8);
|
||||
static const warm = Color(0xFFFFF0E3);
|
||||
static const warmInk = Color(0xFF9E4C18);
|
||||
}
|
||||
|
||||
ThemeData buildAppTheme() {
|
||||
final scheme =
|
||||
ColorScheme.fromSeed(
|
||||
seedColor: AppColors.green,
|
||||
brightness: Brightness.light,
|
||||
).copyWith(
|
||||
surface: AppColors.surface,
|
||||
onSurface: AppColors.ink,
|
||||
primary: AppColors.green,
|
||||
onPrimary: Colors.white,
|
||||
outline: AppColors.line,
|
||||
);
|
||||
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
colorScheme: scheme,
|
||||
scaffoldBackgroundColor: AppColors.paper,
|
||||
fontFamily: 'PingFang SC',
|
||||
appBarTheme: const AppBarTheme(
|
||||
backgroundColor: AppColors.surface,
|
||||
foregroundColor: AppColors.ink,
|
||||
elevation: 0,
|
||||
centerTitle: false,
|
||||
),
|
||||
textTheme: const TextTheme(
|
||||
headlineMedium: TextStyle(
|
||||
color: AppColors.ink,
|
||||
fontSize: 26,
|
||||
height: 1.25,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: -0.6,
|
||||
),
|
||||
titleLarge: TextStyle(
|
||||
color: AppColors.ink,
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600,
|
||||
),
|
||||
bodyLarge: TextStyle(color: AppColors.ink, fontSize: 16, height: 1.5),
|
||||
bodyMedium: TextStyle(color: AppColors.muted, fontSize: 14, height: 1.5),
|
||||
),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user