variablesFromJson function

List<Variable>? variablesFromJson(
  1. Map<String, dynamic>? json
)

Implementation

List<Variable>? variablesFromJson(Map<String, dynamic>? json) {
  if (json == null) return null;
  final data = json.entries
      .map((e) => Variable.fromJson((e.value as Map<String, dynamic>)
        ..putIfAbsent('variable_name', () => e.key)))
      .toList();
  return data;
}