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

@@ -18,21 +18,6 @@ migration:
- platform: android - platform: android
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2 create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2 base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
- platform: ios
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
- platform: linux
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
- platform: macos
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
- platform: web
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
- platform: windows
create_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
base_revision: d693b4b9dbac2acd4477aea4555ca6dcbea44ba2
# User provided section # User provided section

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -55,6 +55,7 @@
/// - Expense /// - Expense
/// - Group /// - Group
/// - ExpenseBloc /// - ExpenseBloc
library;
import 'dart:io'; import 'dart:io';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.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 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. /// The widget handles both light and dark themes and provides a fallback UI for empty balance lists.
library;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../../models/user_balance.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 /// 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 /// of the expense. It also integrates with BLoC for state management and supports features like receipt display
/// and split payment marking. /// and split payment marking.
library;
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:flutter_bloc/flutter_bloc.dart';

View File

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

View File

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

View File

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