expandGenerators method
String?
expandGenerators(
- Sqlite annotation, {
- required FieldElement field,
- required SharedChecker<
Model> checker,
inherited
Convert placeholders in fromGenerator
and toGenerator
to functions.
Implementation
String? expandGenerators(
FieldAnnotation annotation, {
required FieldElement field,
required SharedChecker checker,
}) {
final name = providerNameForField(annotation.name, checker: checker);
if (doesDeserialize && annotation.fromGenerator != null) {
return digestPlaceholders(annotation.fromGenerator, name, field.name);
}
if (!doesDeserialize && annotation.toGenerator != null) {
return digestPlaceholders(annotation.toGenerator, name, field.name);
}
return null;
}