chore: fix 273+ analysis issues and repair corrupted core files

This commit is contained in:
2026-03-20 21:05:23 +05:30
parent d3159bc2ae
commit 39263a4af5
59 changed files with 265 additions and 3268 deletions

View File

@@ -24,7 +24,7 @@ class CoverageBloc extends Bloc<CoverageEvent, CoverageState>
Emitter<CoverageState> emit,
) async {
await handleError(
emit: emit,
emit: emit.call,
action: () async {
emit(CoverageLoading());
final CoverageReport report = await _getCoverageReportUseCase.call(

View File

@@ -1,4 +1,4 @@
import 'package:equatable/equatable.dart';
import 'package:equatable/equatable.dart';
import 'package:krow_domain/krow_domain.dart';
/// Base state for the coverage report BLoC.

View File

@@ -24,7 +24,7 @@ class DailyOpsBloc extends Bloc<DailyOpsEvent, DailyOpsState>
Emitter<DailyOpsState> emit,
) async {
await handleError(
emit: emit,
emit: emit.call,
action: () async {
emit(DailyOpsLoading());
final DailyOpsReport report = await _getDailyOpsReportUseCase.call(

View File

@@ -1,4 +1,4 @@
import 'package:equatable/equatable.dart';
import 'package:equatable/equatable.dart';
import 'package:krow_domain/krow_domain.dart';
/// Base state for the daily operations report BLoC.

View File

@@ -24,7 +24,7 @@ class ForecastBloc extends Bloc<ForecastEvent, ForecastState>
Emitter<ForecastState> emit,
) async {
await handleError(
emit: emit,
emit: emit.call,
action: () async {
emit(ForecastLoading());
final ForecastReport report = await _getForecastReportUseCase.call(

View File

@@ -1,4 +1,4 @@
import 'package:equatable/equatable.dart';
import 'package:equatable/equatable.dart';
import 'package:krow_domain/krow_domain.dart';
/// Base state for the forecast report BLoC.

View File

@@ -24,7 +24,7 @@ class NoShowBloc extends Bloc<NoShowEvent, NoShowState>
Emitter<NoShowState> emit,
) async {
await handleError(
emit: emit,
emit: emit.call,
action: () async {
emit(NoShowLoading());
final NoShowReport report = await _getNoShowReportUseCase.call(

View File

@@ -1,4 +1,4 @@
import 'package:equatable/equatable.dart';
import 'package:equatable/equatable.dart';
import 'package:krow_domain/krow_domain.dart';
/// Base state for the no-show report BLoC.

View File

@@ -25,7 +25,7 @@ class PerformanceBloc extends Bloc<PerformanceEvent, PerformanceState>
Emitter<PerformanceState> emit,
) async {
await handleError(
emit: emit,
emit: emit.call,
action: () async {
emit(PerformanceLoading());
final PerformanceReport report = await _getPerformanceReportUseCase.call(

View File

@@ -1,4 +1,4 @@
import 'package:equatable/equatable.dart';
import 'package:equatable/equatable.dart';
import 'package:krow_domain/krow_domain.dart';
/// Base state for the performance report BLoC.

View File

@@ -24,7 +24,7 @@ class SpendBloc extends Bloc<SpendEvent, SpendState>
Emitter<SpendState> emit,
) async {
await handleError(
emit: emit,
emit: emit.call,
action: () async {
emit(SpendLoading());
final SpendReport report = await _getSpendReportUseCase.call(

View File

@@ -1,4 +1,4 @@
import 'package:equatable/equatable.dart';
import 'package:equatable/equatable.dart';
import 'package:krow_domain/krow_domain.dart';
/// Base state for the spend report BLoC.

View File

@@ -26,7 +26,7 @@ class ReportsSummaryBloc
Emitter<ReportsSummaryState> emit,
) async {
await handleError(
emit: emit,
emit: emit.call,
action: () async {
emit(ReportsSummaryLoading());
final ReportSummary summary = await _getReportsSummaryUseCase.call(

View File

@@ -71,7 +71,7 @@ class _CoverageReportPageState extends State<CoverageReportPage> {
width: 40,
height: 40,
decoration: BoxDecoration(
color: UiColors.white.withOpacity(0.2),
color: UiColors.white.withValues(alpha: 0.2),
shape: BoxShape.circle,
),
child: const Icon(
@@ -95,7 +95,7 @@ class _CoverageReportPageState extends State<CoverageReportPage> {
context.t.client_reports.coverage_report
.subtitle,
style: UiTypography.body3r.copyWith(
color: UiColors.white.withOpacity(0.7),
color: UiColors.white.withValues(alpha: 0.7),
),
),
],
@@ -203,7 +203,7 @@ class _CoverageSummaryCard extends StatelessWidget {
borderRadius: BorderRadius.circular(16),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.04),
color: UiColors.black.withValues(alpha: 0.04),
blurRadius: 10,
),
],
@@ -214,7 +214,7 @@ class _CoverageSummaryCard extends StatelessWidget {
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: color.withOpacity(0.1),
color: color.withValues(alpha: 0.1),
shape: BoxShape.circle,
),
child: Icon(icon, size: 16, color: color),

View File

@@ -101,7 +101,7 @@ class _DailyOpsReportPageState extends State<DailyOpsReportPage> {
width: 40,
height: 40,
decoration: BoxDecoration(
color: UiColors.white.withOpacity(0.2),
color: UiColors.white.withValues(alpha: 0.2),
shape: BoxShape.circle,
),
child: const Icon(
@@ -126,7 +126,7 @@ class _DailyOpsReportPageState extends State<DailyOpsReportPage> {
context.t.client_reports.daily_ops_report
.subtitle,
style: UiTypography.body3r.copyWith(
color: UiColors.white.withOpacity(0.7),
color: UiColors.white.withValues(alpha: 0.7),
),
),
],
@@ -155,7 +155,7 @@ class _DailyOpsReportPageState extends State<DailyOpsReportPage> {
borderRadius: BorderRadius.circular(12),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.06),
color: UiColors.black.withValues(alpha: 0.06),
blurRadius: 4,
),
],
@@ -390,7 +390,7 @@ class _OpsStatCard extends StatelessWidget {
vertical: 3,
),
decoration: BoxDecoration(
color: color.withOpacity(0.12),
color: color.withValues(alpha: 0.12),
borderRadius: BorderRadius.circular(4),
),
child: Text(
@@ -451,7 +451,7 @@ class _ShiftListItem extends StatelessWidget {
borderRadius: BorderRadius.circular(12),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.02),
color: UiColors.black.withValues(alpha: 0.02),
blurRadius: 2,
),
],
@@ -497,7 +497,7 @@ class _ShiftListItem extends StatelessWidget {
margin: const EdgeInsets.only(left: 8),
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: statusColor.withOpacity(0.1),
color: statusColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(6),
),
child: Text(

View File

@@ -119,7 +119,7 @@ class _ForecastReportPageState extends State<ForecastReportPage> {
width: 40,
height: 40,
decoration: BoxDecoration(
color: UiColors.white.withOpacity(0.2),
color: UiColors.white.withValues(alpha: 0.2),
shape: BoxShape.circle,
),
child: const Icon(
@@ -141,7 +141,7 @@ class _ForecastReportPageState extends State<ForecastReportPage> {
Text(
context.t.client_reports.forecast_report.subtitle,
style: UiTypography.body2m.copyWith(
color: UiColors.white.withOpacity(0.7),
color: UiColors.white.withValues(alpha: 0.7),
),
),
],
@@ -213,7 +213,7 @@ class _ForecastReportPageState extends State<ForecastReportPage> {
borderRadius: BorderRadius.circular(16),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.04),
color: UiColors.black.withValues(alpha: 0.04),
blurRadius: 10,
),
],
@@ -289,7 +289,7 @@ class _MetricCard extends StatelessWidget {
borderRadius: BorderRadius.circular(16),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.04),
color: UiColors.black.withValues(alpha: 0.04),
blurRadius: 8,
),
],
@@ -469,7 +469,7 @@ class _ForecastChart extends StatelessWidget {
),
belowBarData: BarAreaData(
show: true,
color: UiColors.tagPending.withOpacity(0.5),
color: UiColors.tagPending.withValues(alpha: 0.5),
),
),
],

View File

@@ -74,7 +74,7 @@ class _NoShowReportPageState extends State<NoShowReportPage> {
width: 40,
height: 40,
decoration: BoxDecoration(
color: UiColors.white.withOpacity(0.15),
color: UiColors.white.withValues(alpha: 0.15),
shape: BoxShape.circle,
),
child: const Icon(
@@ -97,7 +97,7 @@ class _NoShowReportPageState extends State<NoShowReportPage> {
Text(
context.t.client_reports.no_show_report.subtitle,
style: UiTypography.body3r.copyWith(
color: UiColors.white.withOpacity(0.6),
color: UiColors.white.withValues(alpha: 0.6),
),
),
],
@@ -225,7 +225,7 @@ class _SummaryChip extends StatelessWidget {
borderRadius: BorderRadius.circular(12),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.06),
color: UiColors.black.withValues(alpha: 0.06),
blurRadius: 8,
offset: const Offset(0, 2),
),
@@ -302,7 +302,7 @@ class _WorkerCard extends StatelessWidget {
borderRadius: BorderRadius.circular(12),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.04),
color: UiColors.black.withValues(alpha: 0.04),
blurRadius: 6,
),
],

View File

@@ -157,7 +157,7 @@ class _PerformanceReportPageState extends State<PerformanceReportPage> {
width: 40,
height: 40,
decoration: BoxDecoration(
color: UiColors.white.withOpacity(0.2),
color: UiColors.white.withValues(alpha: 0.2),
shape: BoxShape.circle,
),
child: const Icon(
@@ -182,7 +182,7 @@ class _PerformanceReportPageState extends State<PerformanceReportPage> {
context.t.client_reports.performance_report
.subtitle,
style: UiTypography.body3r.copyWith(
color: UiColors.white.withOpacity(0.7),
color: UiColors.white.withValues(alpha: 0.7),
),
),
],
@@ -212,7 +212,7 @@ class _PerformanceReportPageState extends State<PerformanceReportPage> {
borderRadius: BorderRadius.circular(16),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.04),
color: UiColors.black.withValues(alpha: 0.04),
blurRadius: 10,
offset: const Offset(0, 4),
),
@@ -270,7 +270,7 @@ class _PerformanceReportPageState extends State<PerformanceReportPage> {
borderRadius: BorderRadius.circular(16),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.04),
color: UiColors.black.withValues(alpha: 0.04),
blurRadius: 10,
),
],
@@ -387,7 +387,7 @@ class _KpiRow extends StatelessWidget {
width: 36,
height: 36,
decoration: BoxDecoration(
color: kpi.iconColor.withOpacity(0.1),
color: kpi.iconColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(8),
),
child: Icon(kpi.icon, size: 18, color: kpi.iconColor),

View File

@@ -1,4 +1,4 @@
import 'package:client_reports/src/presentation/blocs/summary/reports_summary_bloc.dart';
import 'package:client_reports/src/presentation/blocs/summary/reports_summary_bloc.dart';
import 'package:client_reports/src/presentation/blocs/summary/reports_summary_event.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';

View File

@@ -81,7 +81,7 @@ class _SpendReportPageState extends State<SpendReportPage> {
width: 40,
height: 40,
decoration: BoxDecoration(
color: UiColors.white.withOpacity(0.2),
color: UiColors.white.withValues(alpha: 0.2),
shape: BoxShape.circle,
),
child: const Icon(
@@ -104,7 +104,7 @@ class _SpendReportPageState extends State<SpendReportPage> {
Text(
context.t.client_reports.spend_report.subtitle,
style: UiTypography.body3r.copyWith(
color: UiColors.white.withOpacity(0.7),
color: UiColors.white.withValues(alpha: 0.7),
),
),
],
@@ -164,7 +164,7 @@ class _SpendReportPageState extends State<SpendReportPage> {
borderRadius: BorderRadius.circular(16),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.04),
color: UiColors.black.withValues(alpha: 0.04),
blurRadius: 10,
offset: const Offset(0, 4),
),
@@ -358,7 +358,7 @@ class _SpendStatCard extends StatelessWidget {
borderRadius: BorderRadius.circular(16),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.06),
color: UiColors.black.withValues(alpha: 0.06),
blurRadius: 8,
offset: const Offset(0, 4),
),
@@ -392,7 +392,7 @@ class _SpendStatCard extends StatelessWidget {
Container(
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
decoration: BoxDecoration(
color: themeColor.withOpacity(0.1),
color: themeColor.withValues(alpha: 0.1),
borderRadius: BorderRadius.circular(6),
),
child: Text(
@@ -424,7 +424,7 @@ class _SpendByCategoryCard extends StatelessWidget {
borderRadius: BorderRadius.circular(16),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.04),
color: UiColors.black.withValues(alpha: 0.04),
blurRadius: 10,
offset: const Offset(0, 4),
),

View File

@@ -1,4 +1,4 @@
import 'package:client_reports/src/presentation/widgets/reports_page/report_card.dart';
import 'package:client_reports/src/presentation/widgets/reports_page/report_card.dart';
import 'package:core_localization/core_localization.dart';
import 'package:design_system/design_system.dart';
import 'package:flutter/material.dart';

View File

@@ -44,7 +44,7 @@ class ReportCard extends StatelessWidget {
borderRadius: BorderRadius.circular(12),
boxShadow: <BoxShadow>[
BoxShadow(
color: UiColors.black.withOpacity(0.02),
color: UiColors.black.withValues(alpha: 0.02),
blurRadius: 2,
),
],

View File

@@ -51,7 +51,7 @@ class ReportsHeader extends StatelessWidget {
width: 40,
height: 40,
decoration: BoxDecoration(
color: UiColors.white.withOpacity(0.2),
color: UiColors.white.withValues(alpha: 0.2),
shape: BoxShape.circle,
),
child: const Icon(
@@ -84,7 +84,7 @@ class ReportsHeader extends StatelessWidget {
height: 44,
padding: const EdgeInsets.all(4),
decoration: BoxDecoration(
color: UiColors.white.withOpacity(0.2),
color: UiColors.white.withValues(alpha: 0.2),
borderRadius: BorderRadius.circular(12),
),
child: TabBar(