shouldIncludeHiddenFieldInModelClass method
Whether code generation should emit this field on the in-memory model and Implicit copy/fromJson helpers.
On the client, modelHasTable must be true when the model class is
table-backed for this code side (e.g. ModelClassDefinition.shouldGenerateTableCode).
Implementation
bool shouldIncludeHiddenFieldInModelClass(
bool serverCode, {
bool modelHasTable = true,
}) {
if (!hiddenSerializableField(serverCode)) {
return false;
}
if (serverCode) {
return true;
}
return modelHasTable;
}