Complete transformation from dark to light theme with a professional, tech-forward design system featuring: - Material 3 theming with cyan-based color palette (#0891B2 primary) - Inter font family integration via Google Fonts - Comprehensive theme system (colors, spacing, typography, shadows) - Responsive component redesign across all screens - Enhanced UX with hover animations, Hero transitions, and shimmer loading - Accessibility features (reduced motion support, high contrast) - Clean architecture with zero hardcoded values Theme System: - Created app_colors.dart with semantic color constants - Created app_spacing.dart with 8px base spacing scale - Created app_theme.dart with complete Material 3 configuration - Added shimmer_loading.dart for image loading states UI Components Updated: - Book cards with hover effects and Hero animations - Bottom navigation with refined styling - All screens migrated to theme-based colors and typography - Forms and inputs using consistent design system Documentation: - Added REDESIGN_SUMMARY.md with complete implementation overview - Added IMPLEMENTATION_CHECKLIST.md with detailed task completion status All components now use centralized theme with no hardcoded values, ensuring consistency and easy future customization. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
54 lines
1.3 KiB
Dart
54 lines
1.3 KiB
Dart
import 'package:flutter_bloc/flutter_bloc.dart';
|
|
import '../models/models.dart';
|
|
|
|
// Events
|
|
sealed class NavigationEvent {}
|
|
|
|
class NavigateTo extends NavigationEvent {
|
|
final AppScreen screen;
|
|
final Book? selectedBook;
|
|
final Book? prefilledData;
|
|
NavigateTo(this.screen, {this.selectedBook, this.prefilledData});
|
|
}
|
|
|
|
// State
|
|
class NavigationState {
|
|
final AppScreen screen;
|
|
final Book? selectedBook;
|
|
final Book? prefilledData;
|
|
const NavigationState({
|
|
this.screen = AppScreen.library,
|
|
this.selectedBook,
|
|
this.prefilledData,
|
|
});
|
|
|
|
NavigationState copyWith({
|
|
AppScreen? screen,
|
|
Book? Function()? selectedBook,
|
|
Book? Function()? prefilledData,
|
|
}) {
|
|
return NavigationState(
|
|
screen: screen ?? this.screen,
|
|
selectedBook: selectedBook != null ? selectedBook() : this.selectedBook,
|
|
prefilledData: prefilledData != null
|
|
? prefilledData()
|
|
: this.prefilledData,
|
|
);
|
|
}
|
|
}
|
|
|
|
// Bloc
|
|
class NavigationBloc extends Bloc<NavigationEvent, NavigationState> {
|
|
NavigationBloc() : super(const NavigationState()) {
|
|
on<NavigateTo>((event, emit) {
|
|
emit(
|
|
NavigationState(
|
|
screen: event.screen,
|
|
selectedBook: event.selectedBook ?? state.selectedBook,
|
|
prefilledData: event.prefilledData,
|
|
),
|
|
);
|
|
});
|
|
}
|
|
}
|