createMapProperty<K, V> method Null safety

EmpireMapProperty<K, V> createMapProperty<K, V>(
  1. Map<K, V> values,
  2. {String? propertyName}
)

Short hand helper function for initializing an EmpireMapProperty.

See EmpireProperty for propertyName usages.

Example

late final EmpireMapProperty planet;

planet = createMapProperty<String, dynamic>({'name': 'Earth', 'population': 8000000000});

Implementation

EmpireMapProperty<K, V> createMapProperty<K, V>(Map<K, V> values,
    {String? propertyName}) {
  return EmpireMapProperty(values, this, propertyName: propertyName);
}