createDateTimeProperty method Null safety

EmpireDateTimeProperty createDateTimeProperty(
  1. DateTime value,
  2. {String? propertyname}
)

Short hand helper function for initializing an EmpireDateTimeProperty.

See EmpireProperty for propertyName usages.

Example

late final EmpireDateTimeProperty birthDate;

birthDate = createDateTimeProperty(DateTime(1985, 1, 1));

Implementation

EmpireDateTimeProperty createDateTimeProperty(DateTime value,
    {String? propertyname}) {
  return EmpireDateTimeProperty(value, this, propertyName: propertyname);
}