Skip to main content

registerForAnEvent method

Future registerForAnEvent (String eventId)

<p>This function is used to register user for an event.</p> <p><strong>params</strong>:</p> <ul> <li><code>eventId</code>: id of an event.</li> </ul> <p><strong>returns</strong>:</p> <ul> <li><code>Future<dynamic></code>: Information about the event registration.</li> </ul>

Implementation

Future\<dynamic\> registerForAnEvent(String eventId) async \{
final tokenResult = await _dbFunctions
.refreshAccessToken(userConfig.currentUser.refreshToken!);
debugPrint(tokenResult.toString());
final Map\<String, dynamic\> variables = \{'eventId': eventId\};
final result = await _dbFunctions.gqlAuthMutation(
EventQueries().registerForEvent(),
variables: variables,
);
return result;
\}