digestPlaceholders method

  1. @mustCallSuper
String? digestPlaceholders(
  1. String? input,
  2. String annotatedName,
  3. String fieldName
)
inherited

Replace default placeholders

Implementation

@mustCallSuper
String? digestPlaceholders(String? input, String annotatedName, String fieldName) {
  if (input == null) return null;

  input = input
      .replaceAll(FieldSerializable.ANNOTATED_NAME_VARIABLE, annotatedName)
      .replaceAll(FieldSerializable.DATA_PROPERTY_VARIABLE, "data['$annotatedName']")
      .replaceAll(FieldSerializable.INSTANCE_PROPERTY_VARIABLE, 'instance.$fieldName');
  return SerdesGenerator.digestCustomGeneratorPlaceholders(input);
}