updateCallback method
Implementation
void updateCallback(String value, String comments, bool update) {
if (update) {
Map<String, dynamic> data = {
"interpretationType": value,
"interpretationExtraComments": comments,
};
_db.updateDocument(
databaseId: AppConstants.appwriteDatabaseId,
collectionId: 'tests',
documentId: widget.test.id!,
data: data,
);
setState(() {
test!.interpretationType = value;
test!.interpretationExtraComments = comments;
radioValue = value;
});
} else {
setState(() {
radioValue = null;
});
}
}