shouldBeConstant method

bool shouldBeConstant(
  1. BuildContext ctx
)

Implementation

bool shouldBeConstant(BuildContext ctx) {
  // Check if all fields are without a getter
  return !isAssignableToModel(ctx.clazz.thisType) &&
      ctx.clazz.fields.every((f) =>
          f.getter?.isAbstract != false && f.setter?.isAbstract != false);
}