renderToJsonFields static method

dynamic renderToJsonFields(
  1. Iterable<SerField> fields
)

Implementation

static renderToJsonFields(Iterable<SerField> fields) {
  return (LambdaContext _) => fields.map((e) {
        final arg = e.ser == null
            ? e.id!.toCamelCase()
            : e.ser!.replaceAll(SerField.ph, e.id!.toCamelCase());
        return "'${e.id}': $arg,";
      }).join('\n');
}