AggregateRule.fromJson constructor

AggregateRule.fromJson(
  1. Map<String, dynamic> json
)

Restores an aggregate rule from VPS-compatible JSON.

Implementation

factory AggregateRule.fromJson(Map<String, dynamic> json) => AggregateRule(
  label: json['label'] ?? 'Auswertung',
  function: AggregateFunction.values.byName(json['function'] ?? 'sum'),
  expression: json['expression'] ?? 'total',
  bold: json['bold'] ?? false,
  format: ColumnFormat.values.byName(json['format'] ?? 'currency'),
  targetColumnField: json['targetColumnField'] ?? '',
);