variablesToJson function

Map<String, dynamic> variablesToJson(
  1. List<Variable>? variables
)

Implementation

Map<String, dynamic> variablesToJson(List<Variable>? variables) {
  if (variables == null) return {};
  final data = variables.map((e) => MapEntry(e.variableName, e.toJson()));
  return Map.fromEntries(data);
}