serializer method

Code serializer()

Implementation

Code serializer() {
  return Code(
    isInterface || typeParams.isNotEmpty || !hasFromJson
        ? ''
        : serializerDefinitionCode(
            typeName,
            hasFrezzed: hasFrezzed,
            constructorName: isUnion ? null : constructorName,
          ),
  );
}