createListProperty<T> method Null safety

EmpireListProperty<T> createListProperty<T>(
  1. List<T> values,
  2. {String? propertyName}
)

Short hand helper function for initializing an EmpireListProperty.

See EmpireProperty for propertyName usages.

Example

late final EmpireListProperty planets;

planets = createListProperty(<String>['Mecury', 'Venus', 'Earth']);

Implementation

EmpireListProperty<T> createListProperty<T>(List<T> values,
    {String? propertyName}) {
  return EmpireListProperty(values, this, propertyName: propertyName);
}