GuardsStatusChange constructor

GuardsStatusChange(
  1. Map<GuardBase, bool> guardsStatus
)

The event that will be emitted when a guard status changes. Now tracks a sorted list of guards and their status.

Implementation

GuardsStatusChange(Map<GuardBase, bool> guardsStatus)
    : guardsStatus = Map.unmodifiable(
        Map.fromEntries(
          guardsStatus.entries.toList()
            ..sort((a, b) =>
                a.key.guardIdentifier.compareTo(b.key.guardIdentifier)),
        ),
      );