feat: Refactor code structure and optimize performance across multiple modules

This commit is contained in:
Achintha Isuru
2025-11-17 23:29:28 -05:00
parent 831570f2e0
commit a64cbd9edf
1508 changed files with 105319 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import 'package:bloc/bloc.dart';
import 'package:krow/core/entity/staff_contact_entity.dart';
import 'package:meta/meta.dart';
part 'assigned_staff_event.dart';
part 'assigned_staff_state.dart';
class AssignedStaffBloc extends Bloc<AssignedStaffEvent, AssignedStaffState> {
AssignedStaffBloc(
{required List<StaffContact> staffContacts, required String department})
: super(AssignedStaffState(
staffContacts: staffContacts,
department: department,
)) {}
}

View File

@@ -0,0 +1,4 @@
part of 'assigned_staff_bloc.dart';
@immutable
sealed class AssignedStaffEvent {}

View File

@@ -0,0 +1,23 @@
part of 'assigned_staff_bloc.dart';
@immutable
class AssignedStaffState {
final List<StaffContact> staffContacts;
final String department;
final bool inLoading;
const AssignedStaffState({required this.staffContacts, required this.department, this.inLoading = false});
copyWith({
List<StaffContact>? staffContacts,
String? department,
bool? canManualAssign,
bool? inLoading,
}) {
return AssignedStaffState(
staffContacts: staffContacts ?? this.staffContacts,
department: department ?? this.department,
inLoading: inLoading ?? this.inLoading,
);
}
}