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.
This commit is contained in:
@@ -1,20 +1,35 @@
|
||||
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 {}
|
||||
Reference in New Issue
Block a user