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,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';
|
||||
|
||||
Reference in New Issue
Block a user