saveStudyProtocol method
Save a study on the local file system.
Returns true
if successful.
Implementation
@override
Future<bool> saveStudyProtocol(
String studyId,
SmartphoneStudyProtocol study,
) async {
bool success = true;
info("Saving study protocol - id: '$studyId'.");
try {
final json = jsonEncode(study);
File(filename(studyId)).writeAsStringSync(json);
} catch (exception) {
success = false;
warning("Failed to save study protocol '$studyId' - $exception");
}
return success;
}