merge(fix): fix/phase-4-analyzer-errors -> main

This commit is contained in:
UTO Manager Dev 2026-08-09 10:02:49 -04:00
commit 4af8543a29
7 changed files with 15 additions and 31 deletions

View File

@ -1,11 +1,11 @@
# UTO Manager — Development Status
_Last updated: 2026-08-09_
_Last updated: 2026-08-09 (fix/phase-4-analyzer-errors)_
---
## Current Branch
`main` (feature/phase-4-reporting-analytics merged)
`main` (fix/phase-4-analyzer-errors merged)
## Overall Progress

View File

@ -34,6 +34,17 @@ class CommandEvent {
this.isSynced = false,
});
/// Deserializes a [CommandEvent] from a JSON-compatible map.
factory CommandEvent.fromJson(Map<String, dynamic> map) {
return CommandEvent(
eventId: map['eventId'] as String,
type: CommandEventType.values.firstWhere((t) => t.name == map['type']),
payload: map['payload'] as Map<String, dynamic>,
occurredAt: DateTime.parse(map['occurredAt'] as String),
isSynced: map['isSynced'] as bool? ?? false,
);
}
/// Unique identifier for this event (UUID v4).
final String eventId;
@ -58,17 +69,6 @@ class CommandEvent {
'isSynced': isSynced,
};
/// Deserializes a [CommandEvent] from a JSON-compatible map.
factory CommandEvent.fromJson(Map<String, dynamic> map) {
return CommandEvent(
eventId: map['eventId'] as String,
type: CommandEventType.values.firstWhere((t) => t.name == map['type']),
payload: (map['payload'] as Map<String, dynamic>),
occurredAt: DateTime.parse(map['occurredAt'] as String),
isSynced: map['isSynced'] as bool? ?? false,
);
}
@override
String toString() => 'CommandEvent(id: $eventId, type: ${type.name}, synced: $isSynced)';
}
@ -236,7 +236,6 @@ class DeltaSynchronizer {
/// Sets the connectivity state. When set to true, [syncIfOnline] will
/// attempt to transmit pending events.
// ignore: avoid_setters_without_getters
set isOnline(bool value) => _isOnline = value;
/// Returns true if the synchronizer believes it has network connectivity.

View File

@ -92,7 +92,7 @@ class UnitTreeService {
} else {
final parent = nodeMap[unit.parentUnitId];
if (parent != null) {
(parent.children as List<UnitTreeNode>).add(nodeMap[unit.unitId]!);
parent.children.add(nodeMap[unit.unitId]!);
}
}
}

View File

@ -43,17 +43,6 @@ extension _PdfPageSizeExt on PdfPageSize {
return 1224;
}
}
String get displayName {
switch (this) {
case PdfPageSize.letter:
return 'Letter (8.5×11)';
case PdfPageSize.a4:
return 'A4 (210×297mm)';
case PdfPageSize.tabloid:
return 'Tabloid/A3 (11×17)';
}
}
}
// ---------------------------------------------------------------------------
@ -265,8 +254,6 @@ class _PdfBuilder {
stream.writeln('BT /F1 10 Tf ${cx - 40} ${h - 20} Td ($classification) Tj ET');
stream.writeln('BT /F1 10 Tf ${cx - 40} 10 Td ($classification) Tj ET');
final unitById = {for (final u in units) u.unitId: u};
// Draw connector lines first (behind boxes).
for (final unit in units) {
if (unit.parentUnitId == null) continue;

View File

@ -36,7 +36,7 @@ class ProtobufCodec {
static const int _magic = 0x55544F42; // "UTOB"
static const int _version = 1;
final _jsonCodec = const UnitTreeCodec();
UnitTreeCodec get _jsonCodec => const UnitTreeCodec();
// ---------------------------------------------------------------------------
// Encode

View File

@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:uto_manager/application/blocs/personnel_cubit.dart';
import 'package:uto_manager/application/blocs/template_cubit.dart';
import 'package:uto_manager/application/blocs/unit_tree_cubit.dart';
import 'package:uto_manager/application/blocs/validation_cubit.dart';
import 'package:uto_manager/domain/entities/personnel_record.dart';

View File

@ -1,4 +1,3 @@
import 'package:drift/drift.dart';
import 'package:drift/native.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';