createDoubleProperty method Null safety

EmpireDoubleProperty createDoubleProperty(
  1. double value,
  2. {String? propertyName}
)

Short hand helper function for initializing an EmpireDoubleProperty.

See EmpireProperty for propertyName usages.

Example

late final EmpireDoubleProperty percentage;

percentage = createDoubleProperty(0.72);

Implementation

EmpireDoubleProperty createDoubleProperty(double value,
    {String? propertyName}) {
  return EmpireDoubleProperty(value, this, propertyName: propertyName);
}