getProperty<T extends Property> method
Retrieves the property with the propertyName
Optionally specify the type T
for not needing to cast yourself
Implementation
T? getProperty<T extends Property>(final String propertyName) =>
properties.firstWhereOrNull((prop) => prop.name == propertyName) as T?;