Clean Architecture structure: - core/config - Environment configuration - core/theme - Material 3 theming with FlexColorScheme - core/error - Typed exception hierarchy - core/api - Dio HTTP clients with interceptors - core/auth - Authentication state management - routing - go_router with shell navigation - shared/layouts - Adaptive scaffold Dependencies added: - flutter_riverpod, riverpod_annotation, riverpod_generator - freezed, freezed_annotation, json_serializable - dio, go_router, shared_preferences - flex_color_scheme, flutter_adaptive_scaffold Features: - Responsive navigation (rail on desktop, bottom on mobile) - Dashboard placeholder with welcome card - Theme switching infrastructure - API client ready for Core API and Tatlock API 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
65 lines
2.0 KiB
Dart
65 lines
2.0 KiB
Dart
import 'package:flex_color_scheme/flex_color_scheme.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
/// Application theme configuration using Material 3 and FlexColorScheme.
|
|
class AppTheme {
|
|
AppTheme._();
|
|
|
|
/// Light theme
|
|
static ThemeData get light => FlexThemeData.light(
|
|
scheme: FlexScheme.aquaBlue,
|
|
surfaceMode: FlexSurfaceMode.levelSurfacesLowScaffold,
|
|
blendLevel: 9,
|
|
subThemesData: const FlexSubThemesData(
|
|
blendOnLevel: 10,
|
|
blendOnColors: false,
|
|
useM2StyleDividerInM3: true,
|
|
inputDecoratorBorderType: FlexInputBorderType.outline,
|
|
inputDecoratorRadius: 8.0,
|
|
chipRadius: 8.0,
|
|
dialogRadius: 16.0,
|
|
cardRadius: 12.0,
|
|
),
|
|
visualDensity: FlexColorScheme.comfortablePlatformDensity,
|
|
useMaterial3: true,
|
|
fontFamily: null, // Use system font
|
|
);
|
|
|
|
/// Dark theme
|
|
static ThemeData get dark => FlexThemeData.dark(
|
|
scheme: FlexScheme.aquaBlue,
|
|
surfaceMode: FlexSurfaceMode.levelSurfacesLowScaffold,
|
|
blendLevel: 15,
|
|
subThemesData: const FlexSubThemesData(
|
|
blendOnLevel: 20,
|
|
useM2StyleDividerInM3: true,
|
|
inputDecoratorBorderType: FlexInputBorderType.outline,
|
|
inputDecoratorRadius: 8.0,
|
|
chipRadius: 8.0,
|
|
dialogRadius: 16.0,
|
|
cardRadius: 12.0,
|
|
),
|
|
visualDensity: FlexColorScheme.comfortablePlatformDensity,
|
|
useMaterial3: true,
|
|
fontFamily: null,
|
|
);
|
|
}
|
|
|
|
/// Semantic color extensions for domain-specific colors.
|
|
extension SemanticColors on ColorScheme {
|
|
/// Success state color (green)
|
|
Color get success => brightness == Brightness.light
|
|
? const Color(0xFF2E7D32)
|
|
: const Color(0xFF81C784);
|
|
|
|
/// Warning state color (orange)
|
|
Color get warning => brightness == Brightness.light
|
|
? const Color(0xFFF57C00)
|
|
: const Color(0xFFFFB74D);
|
|
|
|
/// Info state color (blue)
|
|
Color get info => brightness == Brightness.light
|
|
? const Color(0xFF1976D2)
|
|
: const Color(0xFF64B5F6);
|
|
}
|