Initial commit: COPILOT D6 Flutter keyboard controller

Flutter web app replacing legacy WPF CCTV surveillance keyboard controller.
Includes wall overview, section view with monitor grid, camera input,
PTZ control, alarm/lock/sequence BLoCs, and legacy-matching UI styling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
klas
2026-02-12 14:57:38 +01:00
commit 40143734fc
125 changed files with 65073 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
import 'package:equatable/equatable.dart';
enum PtzDirection { none, left, right, up, down, zoomIn, zoomOut }
enum PtzLockStatus { none, acquiring, locked, denied }
class PtzState extends Equatable {
final int? activeCameraId;
final PtzDirection currentDirection;
final bool isMoving;
final PtzLockStatus lockStatus;
final String? lockedBy;
final String? error;
const PtzState({
this.activeCameraId,
this.currentDirection = PtzDirection.none,
this.isMoving = false,
this.lockStatus = PtzLockStatus.none,
this.lockedBy,
this.error,
});
bool get hasActiveCamera => activeCameraId != null;
bool get hasLock => lockStatus == PtzLockStatus.locked;
PtzState copyWith({
int? activeCameraId,
PtzDirection? currentDirection,
bool? isMoving,
PtzLockStatus? lockStatus,
String? lockedBy,
String? error,
bool clearCamera = false,
}) {
return PtzState(
activeCameraId:
clearCamera ? null : (activeCameraId ?? this.activeCameraId),
currentDirection: currentDirection ?? this.currentDirection,
isMoving: isMoving ?? this.isMoving,
lockStatus: lockStatus ?? this.lockStatus,
lockedBy: lockedBy ?? this.lockedBy,
error: error,
);
}
@override
List<Object?> get props =>
[activeCameraId, currentDirection, isMoving, lockStatus, lockedBy, error];
}