getFieldByName method
dynamic
getFieldByName(
- String fieldName
)
Implementation
dynamic getFieldByName(String fieldName) {
switch (fieldName) {
case 'id':
return id;
case 'name':
return name;
case 'location':
return location;
case 'responsibleForInformation':
return responsibleForInformation;
case 'url':
return url;
case 'imageUrl':
return imageUrl;
case 'whereItIsRealized':
return whereItIsRealized;
case 'summaryDescription':
return summaryDescription;
case 'practicalImplementationOfThePractice':
return practicalImplementationOfThePractice;
case 'typeOfAgroecologicalPractice':
return typeOfAgroecologicalPractice;
case 'whyYouUseAndWhatYouExpectFromThisPractice':
return whyYouUseAndWhatYouExpectFromThisPractice;
case 'landSize':
return landSize;
case 'substitutionOfLessEcologicalAlternative':
return substitutionOfLessEcologicalAlternative;
case 'agroecologyPrinciplesAddressed':
return agroecologyPrinciplesAddressed;
case 'foodSystemComponentsAddressed':
return foodSystemComponentsAddressed;
case 'generalPerformanceOfPractice':
return generalPerformanceOfPractice;
case 'unintendedPositiveSideEffectsOfPractice':
return unintendedPositiveSideEffectsOfPractice;
case 'unintendedNegativeSideEffectOfPractice':
return unintendedNegativeSideEffectOfPractice;
case 'knowledgeAndSkillsRequiredForPractice':
return knowledgeAndSkillsRequiredForPractice;
case 'labourRequiredForPractice':
return labourRequiredForPractice;
case 'costAssociatedWithPractice':
return costAssociatedWithPractice;
case 'doesItWorkInDegradedEnvironments':
return doesItWorkInDegradedEnvironments;
case 'doesItHelpRestoreLand':
return doesItHelpRestoreLand;
case 'climateChangeVulnerabilityEffects':
return climateChangeVulnerabilityEffects;
case 'timeRequirements':
return timeRequirements;
case 'generalPerformanceOfPracticeDetails':
return generalPerformanceOfPracticeDetails;
case 'unintendedPositiveSideEffectsOfPracticeDetails':
return unintendedPositiveSideEffectsOfPracticeDetails;
case 'unintendedNegativeSideEffectOfPracticeDetails':
return unintendedNegativeSideEffectOfPracticeDetails;
case 'knowledgeAndSkillsRequiredForPracticeDetails':
return knowledgeAndSkillsRequiredForPracticeDetails;
case 'labourRequiredForPracticeDetails':
return labourRequiredForPracticeDetails;
case 'costAssociatedWithPracticeDetails':
return costAssociatedWithPracticeDetails;
case 'doesItWorkInDegradedEnvironmentsDetails':
return doesItWorkInDegradedEnvironmentsDetails;
case 'doesItHelpRestoreLandDetails':
return doesItHelpRestoreLandDetails;
case 'climateChangeVulnerabilityEffectsDetails':
return climateChangeVulnerabilityEffectsDetails;
case 'timeRequirementsDetails':
return timeRequirementsDetails;
case 'knowledgeSource':
return knowledgeSource;
case 'knowledgeTiming':
return knowledgeTiming;
case 'knowledgeProducts':
return knowledgeProducts;
case 'uptakeMotivation':
return uptakeMotivation;
case 'knowledgeSourceDetails':
return knowledgeSourceDetails;
case 'knowledgeTimingDetails':
return knowledgeTimingDetails;
case 'createdAt':
return createdAt;
case 'updatedAt':
return updatedAt;
default:
throw Exception('Invalid field name: $fieldName');
}
}