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,16 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// A reusable error display component.
|
||||
///
|
||||
/// This widget provides a consistent way to display error messages throughout
|
||||
/// the application. It supports customizable titles, messages, icons, and
|
||||
/// action buttons for retry and close operations.
|
||||
class ErrorContent extends StatelessWidget {
|
||||
/// The error title to display
|
||||
final String title;
|
||||
|
||||
/// The error message to display
|
||||
final String message;
|
||||
|
||||
/// Optional callback for retry action
|
||||
final VoidCallback? onRetry;
|
||||
|
||||
/// Optional callback for close action
|
||||
final VoidCallback? onClose;
|
||||
|
||||
/// Icon to display with the error
|
||||
final IconData icon;
|
||||
|
||||
/// Color of the error icon
|
||||
final Color? iconColor;
|
||||
|
||||
/// Creates a new [ErrorContent] widget.
|
||||
///
|
||||
/// [message] is required, other parameters are optional with sensible defaults.
|
||||
const ErrorContent({
|
||||
super.key,
|
||||
this.title = 'Une erreur est survenue',
|
||||
this.title = 'An error occurred',
|
||||
required this.message,
|
||||
this.onRetry,
|
||||
this.onClose,
|
||||
|
||||
Reference in New Issue
Block a user