question_frame 1.0.1 question_frame: ^1.0.1 copied to clipboard
Questionnaire package for dynamic form. The Package aims to provide custom implementation of many type of widget to ease the form making.
This package aims to provide set of question types with options and gets the response in custom generalized data. So the forms can be generated using certain rules and control it from server.
Features #
Render question from server and capture its response
Getting started #
TODO: List prerequisites and provide or point to information on how to start using the package.
Usage #
void framePackage() {
print("start");
final dataController = Get.find<DataController>();
Map<FrameQuestion, FrameUserResponse> questionResponseMap = {};
questionResponseMap.addEntries(
dataController.db.questionBox!.values
.where((question) => question.mId == 1)
.map(
(question) => MapEntry(
FrameQuestion.fromJson(question.toJson()),
FrameUserResponse(
qId: question.id,
qType: question.qType,
options: [],
tag: question.qKey,
),
),
),
);
questionResponseMap.entries.toList().sort(
(a, b) => a.key.id.compareTo(b.key.id),
);
Get.to(FrameWidget(
questionResponseMap: questionResponseMap,
));
print("end");
}
prepare a map of question(FrameQuestion) and corresponding userResponse(FrameUserResponse) and pass it to the frame widget.
Additional information #
TODO: Tell users more about the package: where to find more information, how to contribute to the package, how to file issues, what response they can expect from the package authors, and more.