firstForPropertyName method Null safety
- String propertyName
Gets the first event where the EmpireStateChanged.propertyName matches the
propertyName
argument
Returns null if no event is found
Implementation
EmpireStateChanged<T>? firstForPropertyName(String propertyName) {
final events = where((e) => e.propertyName == propertyName);
return events.isNotEmpty ? events.first : null;
}