setupAsExperimentParticipant function
Future<bool?>
setupAsExperimentParticipant({
- required BuildContext context,
- bool participate = false,
Set-up as an Experiment Participant
function for getting whether a user is set up as an experiment participant
Implementation
Future<bool?> setupAsExperimentParticipant(
{required BuildContext context, bool participate = false}) async {
final IGraphQlClient _client = AppWrapperBase.of(context)!.graphQLClient;
final Response result = await _client.query(setupUserAsExperimentParticipant,
setupAsExperimentParticipantVariables());
final Map<String, dynamic> response = _client.toMap(result);
if (_client.parseError(response) != null) {
return null;
} else {
final bool responseData =
response['data']['setupAsExperimentParticipant'] as bool;
return responseData;
}
}