first commit
This commit is contained in:
24
lib/theme/app_colors.dart
Normal file
24
lib/theme/app_colors.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// App color palette following the design spec
|
||||
/// Based on Morandi color system - calm and gentle
|
||||
class AppColors {
|
||||
// Primary colors
|
||||
static const primary = Color(0xFFA7C4BC); // Calm Green
|
||||
static const background = Color(0xFFF8F6F2); // Warm off-white
|
||||
|
||||
// Text colors
|
||||
static const textPrimary = Color(0xFF5B6D6D);
|
||||
static const textSecondary = Color(0xFF8A9B9B);
|
||||
|
||||
// Button colors
|
||||
static const distractionButton = Color(0xFFE0E0E0);
|
||||
static const success = Color(0xFF88C9A1);
|
||||
|
||||
// Additional colors
|
||||
static const white = Color(0xFFFFFFFF);
|
||||
static const divider = Color(0xFFF0F0F0);
|
||||
|
||||
// Prevent instantiation
|
||||
AppColors._();
|
||||
}
|
||||
68
lib/theme/app_text_styles.dart
Normal file
68
lib/theme/app_text_styles.dart
Normal file
@@ -0,0 +1,68 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'app_colors.dart';
|
||||
|
||||
/// Typography styles following the design spec
|
||||
/// Uses Nunito font family from Google Fonts
|
||||
class AppTextStyles {
|
||||
// App Title
|
||||
static final appTitle = GoogleFonts.nunito(
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w700, // Bold
|
||||
color: AppColors.textPrimary,
|
||||
);
|
||||
|
||||
// Timer Display
|
||||
static final timerDisplay = GoogleFonts.nunito(
|
||||
fontSize: 64,
|
||||
fontWeight: FontWeight.w800, // ExtraBold
|
||||
letterSpacing: 2,
|
||||
color: AppColors.textPrimary,
|
||||
);
|
||||
|
||||
// Button Text
|
||||
static final buttonText = GoogleFonts.nunito(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.w600, // SemiBold
|
||||
color: AppColors.white,
|
||||
);
|
||||
|
||||
// Body Text
|
||||
static final bodyText = GoogleFonts.nunito(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400, // Regular
|
||||
color: AppColors.textPrimary,
|
||||
);
|
||||
|
||||
// Helper Text
|
||||
static final helperText = GoogleFonts.nunito(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w300, // Light
|
||||
color: AppColors.textSecondary,
|
||||
);
|
||||
|
||||
// Headline
|
||||
static final headline = GoogleFonts.nunito(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600, // SemiBold
|
||||
color: AppColors.textPrimary,
|
||||
);
|
||||
|
||||
// Large number (for focus minutes display)
|
||||
static final largeNumber = GoogleFonts.nunito(
|
||||
fontSize: 32,
|
||||
fontWeight: FontWeight.w700, // Bold
|
||||
color: AppColors.textPrimary,
|
||||
);
|
||||
|
||||
// Encouragement quote (italic)
|
||||
static final encouragementQuote = GoogleFonts.nunito(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontStyle: FontStyle.italic,
|
||||
color: AppColors.textSecondary,
|
||||
);
|
||||
|
||||
// Prevent instantiation
|
||||
AppTextStyles._();
|
||||
}
|
||||
69
lib/theme/app_theme.dart
Normal file
69
lib/theme/app_theme.dart
Normal file
@@ -0,0 +1,69 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'app_colors.dart';
|
||||
import 'app_text_styles.dart';
|
||||
|
||||
/// App theme configuration
|
||||
class AppTheme {
|
||||
static ThemeData get lightTheme {
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
|
||||
// Color scheme
|
||||
colorScheme: ColorScheme.light(
|
||||
primary: AppColors.primary,
|
||||
surface: AppColors.background,
|
||||
onPrimary: AppColors.white,
|
||||
onSurface: AppColors.textPrimary,
|
||||
),
|
||||
|
||||
// Scaffold
|
||||
scaffoldBackgroundColor: AppColors.background,
|
||||
|
||||
// AppBar
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: AppColors.background,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
titleTextStyle: AppTextStyles.appTitle,
|
||||
iconTheme: const IconThemeData(color: AppColors.textPrimary),
|
||||
),
|
||||
|
||||
// Elevated Button
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppColors.primary,
|
||||
foregroundColor: AppColors.white,
|
||||
minimumSize: const Size(double.infinity, 56),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
elevation: 4,
|
||||
textStyle: AppTextStyles.buttonText,
|
||||
),
|
||||
),
|
||||
|
||||
// Text Button
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: AppColors.textSecondary,
|
||||
textStyle: AppTextStyles.bodyText,
|
||||
),
|
||||
),
|
||||
|
||||
// Default text theme - Use Google Fonts
|
||||
textTheme: GoogleFonts.nunitoTextTheme(
|
||||
TextTheme(
|
||||
displayLarge: AppTextStyles.timerDisplay,
|
||||
headlineMedium: AppTextStyles.headline,
|
||||
bodyLarge: AppTextStyles.bodyText,
|
||||
bodyMedium: AppTextStyles.helperText,
|
||||
labelLarge: AppTextStyles.buttonText,
|
||||
),
|
||||
),
|
||||
|
||||
// Font family - Use Google Fonts
|
||||
fontFamily: GoogleFonts.nunito().fontFamily,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user