createStringProperty method Null safety

EmpireStringProperty createStringProperty(
  1. String value,
  2. {String? propertyName}
)

Short hand helper function for initializing an EmpireStringProperty.

See EmpireProperty for propertyName usages.

Example

late final EmpireStringProperty name;

name = createStringProperty('Bob');

Implementation

EmpireStringProperty createStringProperty(String value,
    {String? propertyName}) {
  return EmpireStringProperty(value, this, propertyName: propertyName);
}