fix: add ignore_for_file to data connect Repos and modify CI to avoid analyzing deleted files
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// ignore_for_file: always_specify_types, depend_on_referenced_packages, dead_code, dead_null_aware_expression, unused_local_variable, unused_import, sort_constructors_first, prefer_final_fields, prefer_const_constructors, deprecated_member_use, implicit_call_tearoffs
|
||||
import 'package:firebase_data_connect/src/core/ref.dart';
|
||||
import 'package:krow_data_connect/krow_data_connect.dart' as dc;
|
||||
import 'package:krow_domain/krow_domain.dart';
|
||||
import '../../domain/repositories/home_repository_interface.dart';
|
||||
@@ -7,8 +9,6 @@ import '../../domain/repositories/home_repository_interface.dart';
|
||||
/// This implementation follows the "Buffer Layer" pattern by using a dedicated
|
||||
/// connector repository from the data_connect package.
|
||||
class HomeRepositoryImpl implements HomeRepositoryInterface {
|
||||
final dc.HomeConnectorRepository _connectorRepository;
|
||||
final dc.DataConnectService _service;
|
||||
|
||||
HomeRepositoryImpl({
|
||||
dc.HomeConnectorRepository? connectorRepository,
|
||||
@@ -16,10 +16,12 @@ class HomeRepositoryImpl implements HomeRepositoryInterface {
|
||||
}) : _connectorRepository = connectorRepository ??
|
||||
dc.DataConnectService.instance.getHomeRepository(),
|
||||
_service = service ?? dc.DataConnectService.instance;
|
||||
final dc.HomeConnectorRepository _connectorRepository;
|
||||
final dc.DataConnectService _service;
|
||||
|
||||
@override
|
||||
Future<HomeDashboardData> getDashboardData() async {
|
||||
final businessId = await _service.getBusinessId();
|
||||
final String businessId = await _service.getBusinessId();
|
||||
return _connectorRepository.getDashboardData(businessId: businessId);
|
||||
}
|
||||
|
||||
@@ -37,16 +39,16 @@ class HomeRepositoryImpl implements HomeRepositoryInterface {
|
||||
|
||||
return await _service.run(() async {
|
||||
final String businessId = await _service.getBusinessId();
|
||||
final businessResult = await _service.connector
|
||||
final QueryResult<dc.GetBusinessByIdData, dc.GetBusinessByIdVariables> businessResult = await _service.connector
|
||||
.getBusinessById(id: businessId)
|
||||
.execute();
|
||||
|
||||
final b = businessResult.data.business;
|
||||
final dc.GetBusinessByIdBusiness? b = businessResult.data.business;
|
||||
if (b == null) {
|
||||
throw Exception('Business data not found for ID: $businessId');
|
||||
}
|
||||
|
||||
final updatedSession = dc.ClientSession(
|
||||
final dc.ClientSession updatedSession = dc.ClientSession(
|
||||
business: dc.ClientBusinessSession(
|
||||
id: b.id,
|
||||
businessName: b.businessName,
|
||||
@@ -67,7 +69,8 @@ class HomeRepositoryImpl implements HomeRepositoryInterface {
|
||||
|
||||
@override
|
||||
Future<List<ReorderItem>> getRecentReorders() async {
|
||||
final businessId = await _service.getBusinessId();
|
||||
final String businessId = await _service.getBusinessId();
|
||||
return _connectorRepository.getRecentReorders(businessId: businessId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class ClientHomeBloc extends Bloc<ClientHomeEvent, ClientHomeState>
|
||||
) async {
|
||||
emit(state.copyWith(status: ClientHomeStatus.loading));
|
||||
await handleError(
|
||||
emit: emit,
|
||||
emit: emit.call,
|
||||
action: () async {
|
||||
// Get session data
|
||||
final UserSessionData sessionData = await _getUserSessionDataUseCase();
|
||||
|
||||
@@ -651,9 +651,9 @@ class _ShiftOrderFormSheetState extends State<ShiftOrderFormSheet> {
|
||||
|
||||
return Container(
|
||||
height: MediaQuery.of(context).size.height * 0.95,
|
||||
decoration: BoxDecoration(
|
||||
decoration: const BoxDecoration(
|
||||
color: UiColors.bgPrimary,
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(UiConstants.space6)),
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(UiConstants.space6)),
|
||||
),
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
|
||||
Reference in New Issue
Block a user