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:
Dayron
2025-10-30 15:56:17 +01:00
parent 1eeea6997e
commit 2faf37f145
46 changed files with 2656 additions and 220 deletions

View File

@@ -1,3 +1,26 @@
/// A BLoC (Business Logic Component) that manages account-related state and operations.
///
/// This bloc handles account operations such as loading accounts by user ID,
/// creating new accounts, and managing real-time updates from the account repository.
/// It uses stream subscriptions to listen for account changes and emits corresponding states.
///
/// The bloc supports the following operations:
/// - Loading accounts by user ID with real-time updates
/// - Creating a single account without members
/// - Creating an account with associated members
///
/// All errors are logged using [ErrorService] and emitted as [AccountError] states.
///
/// Example usage:
/// ```dart
/// final accountBloc = AccountBloc(accountRepository);
/// accountBloc.add(LoadAccountsByUserId('user123'));
/// ```
///
/// Remember to close the bloc when done to cancel active subscriptions:
/// ```dart
/// accountBloc.close();
/// ```
import 'dart:async';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:travel_mate/services/error_service.dart';