createNullProperty<T> method Null safety

EmpireProperty<T?> createNullProperty<T>(
  1. {String? propertyName}
)

Short hand helper function for initializing an EmpireProperty with a null value.

See EmpireProperty for propertyName usages.

Example

late final EmpireProperty<String?> name;

name = createNullProperty();

Implementation

EmpireProperty<T?> createNullProperty<T>({String? propertyName}) {
  return createProperty(null, propertyName: propertyName);
}