survey_form Package
The survey_form
package is a comprehensive solution for creating survey forms.
Features
- Survey form Pages: The package includes several pages like
survey_form.dart
,survey_form_boundary_view.dart
, andsurvey_form_view.dart
that provide the user interface for creating survey forms.




- SurveyForm Blocs: It provides various BLoCs for state management using the BLoC pattern. These BLoCs handle the business logic for the SurveyForm.
- SurveyForm Models: It defines various data models like
ServiceModel
,ServiceDefinitionModel
, etc. used in the SurveyForm creation process. - SurveyForm Repositories: The package provides abstract classes for data repositories,
ServiceDefinitionLocalRepository
,ServiceLocalRepository
,ServiceDefinitionRemoteRepository
, andServiceRemoteRepository
which can be extended to create repositories for different Service models. It also includes error handling withInvalidApiResponseException
.
Getting Started
To use this package, add the following dependency to your pubspec.yaml
file:
dependencies:
survey_form: ^any
Usage
To Navigate to any screens of the package:
First add survey_form_router to your main app router
Navigate to the required screen using the below code:
context.router.push(SurveyFormWrapperRoute());
SurveyForm package requires below data to be passed from main app:
String _projectId = '';
String _projectName='';
String _loggedInIndividualId = '';
String _loggedInUserUuid = '';
String _appVersion = '';
String _tenantId = '';
Object _roles;
bool _isHealthFacilityWorker;
BoundaryModel? _boundaryModel;
PersistenceConfiguration _persistenceConfiguration;
Libraries
- blocs/app_localization
- blocs/service
- blocs/service_definition
- blocs/survey_form_localization_delegate
- data/repositories/local/service
- data/repositories/local/service_definition
- data/repositories/oplog/oplog
- data/repositories/remote/service
- data/repositories/remote/service_attributes
- data/repositories/remote/service_definition
- models/entities/service
- models/entities/service_attributes
- models/entities/service_definition
- pages/acknowledgement
- pages/survey_form
- pages/survey_form_boundary_view
- pages/survey_form_preview
- pages/survey_form_view
- pages/survey_form_wrapper
- router/survey_form_router
- router/survey_form_router.gm
- survey_form
- survey_form.init
- utils/constants
- utils/extensions/context_utility
- utils/i18_key_constants
- utils/typedefs
- utils/utils
- widgets/localized
- widgets/no_result_card