Files
TravelMate/lib/blocs/theme/theme_event.dart
Dayron 2faf37f145 Enhance model and service documentation with detailed comments and descriptions
- Updated Group, Trip, User, and other model classes to include comprehensive documentation for better understanding and maintainability.
- Improved error handling and logging in services, including AuthService, ErrorService, and StorageService.
- Added validation and business logic explanations in ExpenseService and TripService.
- Refactored method comments to follow a consistent format across the codebase.
- Translated error messages and comments from French to English for consistency.
2025-10-30 15:56:17 +01:00

35 lines
1.2 KiB
Dart

import 'package:equatable/equatable.dart';
import 'package:flutter/material.dart';
/// Abstract base class for all theme-related events.
///
/// This class extends [Equatable] to enable value equality for event comparison.
/// All theme events in the application should inherit from this class.
abstract class ThemeEvent extends Equatable {
/// Creates a new [ThemeEvent].
const ThemeEvent();
@override
List<Object?> get props => [];
}
/// Event to request a theme change.
///
/// This event is dispatched when the user wants to change the application theme
/// mode (light, dark, or system). The new theme mode is persisted and applied immediately.
class ThemeChanged extends ThemeEvent {
/// The new theme mode to apply.
final ThemeMode themeMode;
/// Creates a new [ThemeChanged] event with the specified [themeMode].
const ThemeChanged({required this.themeMode});
@override
List<Object?> get props => [themeMode];
}
/// Event to request loading of saved theme preferences.
///
/// This event is typically dispatched when the app starts to restore
/// the user's previously selected theme preference.
class ThemeLoadRequested extends ThemeEvent {}