feat: Add library directive to multiple BLoC and service files for improved organization

This commit is contained in:
Dayron
2025-11-01 16:29:37 +01:00
parent 48be18460c
commit 0a1a2ffde5
21 changed files with 20 additions and 15 deletions

View File

@@ -21,6 +21,7 @@
/// ```dart
/// accountBloc.close();
/// ```
library;
import 'dart:async';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:travel_mate/services/error_service.dart';

View File

@@ -4,6 +4,7 @@
/// instances. Subclasses should provide the relevant properties by
/// overriding `props` so that the bloc can correctly determine whether
/// the state has changed.
library;
/// Represents the initial state of the account feature.
///

View File

@@ -19,6 +19,7 @@
/// - [AuthAppleSignInRequested]: Processes Apple authentication
/// - [AuthSignOutRequested]: Processes user sign-out
/// - [AuthPasswordResetRequested]: Processes password reset requests
library;
import 'package:flutter_bloc/flutter_bloc.dart';
import '../../repositories/auth_repository.dart';
import 'auth_event.dart';

View File

@@ -31,6 +31,7 @@
/// amount: 50.0,
/// ));
/// ```
library;
import 'package:flutter_bloc/flutter_bloc.dart';
import '../../repositories/balance_repository.dart';
import '../../repositories/expense_repository.dart';

View File

@@ -31,6 +31,7 @@
/// members: [member1, member2],
/// ));
/// ```
library;
import 'dart:async';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:travel_mate/services/error_service.dart';

View File

@@ -12,6 +12,7 @@
///
/// All events extend [GroupEvent] and implement [Equatable] for proper
/// equality comparison in the BLoC pattern.
library;
import 'package:equatable/equatable.dart';
import '../../models/group.dart';
import '../../models/group_member.dart';

View File

@@ -12,6 +12,7 @@
///
/// All states extend [GroupState] and implement [Equatable] for proper
/// equality comparison and state change detection in the BLoC pattern.
library;
import 'package:equatable/equatable.dart';
import '../../models/group.dart';

View File

@@ -39,6 +39,7 @@
/// reaction: '👍',
/// ));
/// ```
library;
import 'dart:async';
import 'package:flutter_bloc/flutter_bloc.dart';
import '../../models/message.dart';

View File

@@ -14,6 +14,7 @@
///
/// All events extend [MessageEvent] and implement [Equatable] for proper
/// equality comparison in the BLoC pattern.
library;
import 'package:equatable/equatable.dart';
/// Base class for all message-related events.

View File

@@ -15,6 +15,7 @@
///
/// All states extend [MessageState] and implement [Equatable] for proper
/// equality comparison and state change detection in the BLoC pattern.
library;
import 'package:equatable/equatable.dart';
import '../../models/message.dart';

View File

@@ -35,6 +35,7 @@
/// // Delete a trip
/// tripBloc.add(TripDeleteRequested(tripId: 'tripId456'));
/// ```
library;
import 'dart:async';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:travel_mate/models/trip.dart';

View File

@@ -14,6 +14,7 @@
///
/// All events extend [TripEvent] and implement [Equatable] for proper
/// equality comparison in the BLoC pattern.
library;
import 'package:equatable/equatable.dart';
import '../../models/trip.dart';

View File

@@ -15,6 +15,7 @@
///
/// All states extend [TripState] and implement [Equatable] for proper
/// equality comparison and state change detection in the BLoC pattern.
library;
import 'package:equatable/equatable.dart';
import '../../models/trip.dart';

View File

@@ -18,6 +18,7 @@
///
/// The component automatically loads account data when initialized and
/// provides a clean interface for managing group-based expenses.
library;
import 'package:flutter/material.dart';
import 'package:travel_mate/blocs/user/user_bloc.dart';
import '../../models/account.dart';

View File

@@ -55,6 +55,7 @@
/// - Expense
/// - Group
/// - ExpenseBloc
library;
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@@ -3,6 +3,7 @@
/// the amount they owe, and their overall balance status (to pay, to receive, or balanced).
///
/// The widget handles both light and dark themes and provides a fallback UI for empty balance lists.
library;
import 'package:flutter/material.dart';
import '../../models/user_balance.dart';

View File

@@ -5,6 +5,7 @@
/// The dialog is highly interactive and adapts its UI based on the current user's permissions and the state
/// of the expense. It also integrates with BLoC for state management and supports features like receipt display
/// and split payment marking.
library;
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@@ -31,6 +31,7 @@
/// - [GroupBalance] for the complete balance structure
/// - [Settlement] for individual payment recommendations
/// - [UserBalance] for per-user balance information
library;
import '../models/group_balance.dart';
import '../models/expense.dart';
import '../models/group_statistics.dart';

View File

@@ -24,6 +24,7 @@
/// // Delete a file
/// await storageService.deleteFile(fileUrl);
/// ```
library;
import 'dart:io';
import 'dart:typed_data';
import 'package:firebase_storage/firebase_storage.dart';

View File

@@ -24,6 +24,7 @@
/// // Calculate trip statistics
/// final stats = await tripService.getTripStatistics(tripId);
/// ```
library;
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:travel_mate/services/error_service.dart';
import '../models/trip.dart';