-
Notifications
You must be signed in to change notification settings - Fork 47
Expand file tree
/
Copy pathmodel.dart
More file actions
74 lines (65 loc) · 2.9 KB
/
Copy pathmodel.dart
File metadata and controls
74 lines (65 loc) · 2.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/// The domain model part of Research Package.
///
/// Contains the "building blocks" for creating surveys and obtaining informed consents.
/// Holds the different types of result classes.
/// Also responsible for the streams and BLoC classes to provide communication channels
/// between different parts of the package. ([BlocQuestion], [BlocTask])
/// For the UI representations of the classes visit the [research_package_ui] library.
library;
import 'package:flutter/material.dart';
import 'dart:async';
import 'package:rxdart/rxdart.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:carp_serializable/carp_serializable.dart';
import 'package:research_package/ui.dart';
// JSON
part 'model.g.dart';
part 'model.json.dart';
// Library elements
part 'src/model/answerformat/answer_format.dart';
part 'src/model/answerformat/integer_answer_format.dart';
part 'src/model/answerformat/double_answer_format.dart';
part 'src/model/answerformat/choice_answer_format.dart';
part 'src/model/answerformat/form_answer_format.dart';
part 'src/model/answerformat/slider_answer_format.dart';
part 'src/model/answerformat/image_choice_answer_format.dart';
part 'src/model/answerformat/star_choice_answer_format.dart';
part 'src/model/answerformat/date_time_answer_format.dart';
part 'src/model/answerformat/text_answer_format.dart';
part 'src/model/consent/consent_document.dart';
part 'src/model/consent/consent_section.dart';
part 'src/model/consent/consent_signature.dart';
part 'src/model/consent/visual_consent_step.dart';
part 'src/model/consent/consent_review_step.dart';
part 'src/model/consent/data_type_section.dart';
part 'src/model/step/step.dart';
part 'src/model/step/form_step.dart';
part 'src/model/step/question_step.dart';
part 'src/model/step/instruction_step.dart';
part 'src/model/step/completion_step.dart';
part 'src/model/step/activity_step.dart';
part 'src/model/step/timer_step.dart';
part 'src/model/task/ordered_task.dart';
part 'src/model/task/navigable_ordered_task.dart';
part 'src/model/task/step_navigation_rule.dart';
part 'src/model/task/direct_step_navigation_rule.dart';
part 'src/model/task/step_reorganizer_rule.dart';
part 'src/model/task/step_jump_rule.dart';
part 'src/model/task/task.dart';
part 'src/model/result/result.dart';
part 'src/model/result/task_result.dart';
part 'src/model/result/step_result.dart';
part 'src/model/result/consent_signature_result.dart';
part 'src/model/result/signature_result.dart';
part 'src/model/result/no_result.dart';
part 'src/model/result/activity_result.dart';
// BLoCs
part 'src/model/blocs/bloc_task.dart';
part 'src/model/blocs/bloc_question.dart';
/// A protocol to mark the Widgets which are producing [RPResult] objects.
/// They all need to implement the [createAndSendResult] method
abstract mixin class CanSaveResult {
/// This method should be implemented in all the Widgets which are producing
/// an [RPResult] object.
void createAndSendResult();
}