getPrefs method

Future<Preferences> getPrefs({
  1. required String teamId,
})

Get team preferences

Get the team's shared preferences by its unique ID. If a preference doesn't need to be shared by all team members, prefer storing them in user preferences.

Implementation

Future<models.Preferences> getPrefs({required String teamId}) async {
  final String apiPath =
      '/teams/{teamId}/prefs'.replaceAll('{teamId}', teamId);

  final Map<String, dynamic> apiParams = {};

  final Map<String, String> apiHeaders = {
    'content-type': 'application/json',
  };

  final res = await client.call(HttpMethod.get,
      path: apiPath, params: apiParams, headers: apiHeaders);

  return models.Preferences.fromMap(res.data);
}