createValues method

Map<String, Object?> createValues([
  1. Map<String, Object?> overrides = const {}
])

Supplies declared defaults once, then validates explicit overrides.

Implementation

Map<String, Object?> createValues([
  Map<String, Object?> overrides = const {},
]) {
  final values = <String, Object?>{
    for (final entry in this.values.entries)
      entry.key: entry.value.defaultValue,
    ...overrides,
  };
  validateValues(values);
  return Map.unmodifiable(values);
}