Initial commit

This commit is contained in:
Kazimierz Ciołek
2026-02-19 02:49:29 +01:00
commit 782986a632
148 changed files with 29230 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
import 'package:flutter/material.dart';
class AppColors {
AppColors._();
// Zinc palette
static const Color zinc50 = Color(0xFFFAFAFA);
static const Color zinc100 = Color(0xFFF4F4F5);
static const Color zinc200 = Color(0xFFE4E4E7);
static const Color zinc300 = Color(0xFFD4D4D8);
static const Color zinc400 = Color(0xFFA1A1AA);
static const Color zinc500 = Color(0xFF71717A);
static const Color zinc600 = Color(0xFF52525B);
static const Color zinc700 = Color(0xFF3F3F46);
static const Color zinc800 = Color(0xFF27272A);
static const Color zinc900 = Color(0xFF18181B);
static const Color zinc950 = Color(0xFF09090B);
// Semantic colors
static const Color surface = zinc950;
static const Color surfaceContainer = zinc900;
static const Color surfaceContainerHigh = zinc800;
static const Color border = zinc800;
static const Color borderSubtle = Color(0xFF1F1F23);
static const Color textPrimary = zinc50;
static const Color textSecondary = zinc400;
static const Color textMuted = zinc500;
// Accent colors
static const Color accent = Color(0xFFFF9800);
static const Color accentMuted = Color(0x33FF9800);
static const Color success = Color(0xFF22C55E);
static const Color successMuted = Color(0x3322C55E);
static const Color destructive = Color(0xFFEF4444);
static const Color destructiveMuted = Color(0x33EF4444);
static const Color info = Color(0xFF3B82F6);
static const Color infoMuted = Color(0x333B82F6);
static const Color purple = Color(0xFF8B5CF6);
static const Color purpleMuted = Color(0x338B5CF6);
static const Color warning = Color(0xFFF59E0B);
}

View File

@@ -0,0 +1,209 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:trainhub_flutter/core/theme/app_colors.dart';
import 'package:trainhub_flutter/core/constants/ui_constants.dart';
class AppTheme {
AppTheme._();
static final ThemeData dark = ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
colorScheme: const ColorScheme.dark(
primary: AppColors.zinc50,
onPrimary: AppColors.zinc950,
secondary: AppColors.zinc200,
onSecondary: AppColors.zinc950,
surface: AppColors.zinc950,
onSurface: AppColors.zinc50,
surfaceContainer: AppColors.zinc900,
error: AppColors.destructive,
onError: AppColors.zinc50,
outline: AppColors.zinc800,
outlineVariant: AppColors.zinc700,
),
scaffoldBackgroundColor: AppColors.surface,
textTheme: GoogleFonts.interTextTheme(ThemeData.dark().textTheme).apply(
bodyColor: AppColors.textPrimary,
displayColor: AppColors.textPrimary,
),
cardTheme: CardThemeData(
color: AppColors.surfaceContainer,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: UIConstants.cardBorderRadius,
side: const BorderSide(color: AppColors.border, width: 1),
),
margin: EdgeInsets.zero,
),
dividerTheme: const DividerThemeData(
color: AppColors.border,
thickness: 1,
space: 1,
),
iconTheme: const IconThemeData(
color: AppColors.textSecondary,
size: 20,
),
navigationRailTheme: NavigationRailThemeData(
backgroundColor: AppColors.surfaceContainer,
selectedIconTheme: const IconThemeData(color: AppColors.textPrimary),
unselectedIconTheme: const IconThemeData(color: AppColors.textMuted),
selectedLabelTextStyle: GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w500,
color: AppColors.textPrimary,
),
unselectedLabelTextStyle: GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w400,
color: AppColors.textMuted,
),
indicatorColor: AppColors.zinc700,
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: AppColors.surfaceContainer,
contentPadding: const EdgeInsets.symmetric(horizontal: 12, vertical: 12),
border: OutlineInputBorder(
borderRadius: UIConstants.smallCardBorderRadius,
borderSide: const BorderSide(color: AppColors.border),
),
enabledBorder: OutlineInputBorder(
borderRadius: UIConstants.smallCardBorderRadius,
borderSide: const BorderSide(color: AppColors.border),
),
focusedBorder: OutlineInputBorder(
borderRadius: UIConstants.smallCardBorderRadius,
borderSide: const BorderSide(color: AppColors.zinc400, width: 1),
),
hintStyle: GoogleFonts.inter(
color: AppColors.textMuted,
fontSize: 14,
),
labelStyle: GoogleFonts.inter(
color: AppColors.textSecondary,
fontSize: 14,
),
),
dialogTheme: DialogThemeData(
backgroundColor: AppColors.surfaceContainer,
shape: RoundedRectangleBorder(
borderRadius: UIConstants.cardBorderRadius,
side: const BorderSide(color: AppColors.border),
),
titleTextStyle: GoogleFonts.inter(
fontSize: 18,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
),
),
filledButtonTheme: FilledButtonThemeData(
style: FilledButton.styleFrom(
backgroundColor: AppColors.zinc50,
foregroundColor: AppColors.zinc950,
shape: RoundedRectangleBorder(
borderRadius: UIConstants.smallCardBorderRadius,
),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
textStyle: GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
foregroundColor: AppColors.textPrimary,
side: const BorderSide(color: AppColors.border),
shape: RoundedRectangleBorder(
borderRadius: UIConstants.smallCardBorderRadius,
),
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
textStyle: GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(
foregroundColor: AppColors.textSecondary,
shape: RoundedRectangleBorder(
borderRadius: UIConstants.smallCardBorderRadius,
),
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
textStyle: GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w500,
),
),
),
tabBarTheme: TabBarThemeData(
labelColor: AppColors.textPrimary,
unselectedLabelColor: AppColors.textMuted,
indicatorColor: AppColors.textPrimary,
dividerColor: AppColors.border,
labelStyle: GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w500,
),
unselectedLabelStyle: GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
snackBarTheme: SnackBarThemeData(
backgroundColor: AppColors.surfaceContainer,
contentTextStyle: GoogleFonts.inter(
color: AppColors.textPrimary,
fontSize: 14,
),
shape: RoundedRectangleBorder(
borderRadius: UIConstants.smallCardBorderRadius,
side: const BorderSide(color: AppColors.border),
),
behavior: SnackBarBehavior.floating,
),
bottomSheetTheme: const BottomSheetThemeData(
backgroundColor: AppColors.surfaceContainer,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
),
),
dropdownMenuTheme: DropdownMenuThemeData(
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: AppColors.surfaceContainer,
border: OutlineInputBorder(
borderRadius: UIConstants.smallCardBorderRadius,
borderSide: const BorderSide(color: AppColors.border),
),
),
),
checkboxTheme: CheckboxThemeData(
fillColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) {
return AppColors.zinc50;
}
return Colors.transparent;
}),
checkColor: WidgetStateProperty.all(AppColors.zinc950),
side: const BorderSide(color: AppColors.zinc400),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(4),
),
),
tooltipTheme: TooltipThemeData(
decoration: BoxDecoration(
color: AppColors.zinc800,
borderRadius: BorderRadius.circular(6),
border: Border.all(color: AppColors.zinc700),
),
textStyle: GoogleFonts.inter(
color: AppColors.textPrimary,
fontSize: 12,
),
),
);
}

View File

@@ -0,0 +1,103 @@
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:trainhub_flutter/core/theme/app_colors.dart';
class AppTypography {
AppTypography._();
static TextStyle get displayLarge => GoogleFonts.inter(
fontSize: 36,
fontWeight: FontWeight.w700,
color: AppColors.textPrimary,
height: 1.2,
);
static TextStyle get headlineLarge => GoogleFonts.inter(
fontSize: 28,
fontWeight: FontWeight.w700,
color: AppColors.textPrimary,
height: 1.3,
);
static TextStyle get headlineMedium => GoogleFonts.inter(
fontSize: 24,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
height: 1.3,
);
static TextStyle get titleLarge => GoogleFonts.inter(
fontSize: 20,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
height: 1.4,
);
static TextStyle get titleMedium => GoogleFonts.inter(
fontSize: 16,
fontWeight: FontWeight.w500,
color: AppColors.textPrimary,
height: 1.4,
);
static TextStyle get titleSmall => GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w500,
color: AppColors.textPrimary,
height: 1.4,
);
static TextStyle get bodyLarge => GoogleFonts.inter(
fontSize: 16,
fontWeight: FontWeight.w400,
color: AppColors.textPrimary,
height: 1.5,
);
static TextStyle get bodyMedium => GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w400,
color: AppColors.textPrimary,
height: 1.5,
);
static TextStyle get bodySmall => GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w400,
color: AppColors.textSecondary,
height: 1.5,
);
static TextStyle get labelLarge => GoogleFonts.inter(
fontSize: 14,
fontWeight: FontWeight.w500,
color: AppColors.textPrimary,
height: 1.4,
);
static TextStyle get labelMedium => GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w500,
color: AppColors.textPrimary,
height: 1.4,
);
static TextStyle get caption => GoogleFonts.inter(
fontSize: 12,
fontWeight: FontWeight.w400,
color: AppColors.textMuted,
height: 1.4,
);
static TextStyle get monoLarge => GoogleFonts.jetBrainsMono(
fontSize: 72,
fontWeight: FontWeight.w700,
color: AppColors.textPrimary,
);
static TextStyle get monoMedium => GoogleFonts.jetBrainsMono(
fontSize: 14,
fontWeight: FontWeight.w400,
color: AppColors.textPrimary,
);
}