getSecrets method
Retrieves secrets associated with the team.
Implementation
Future<List<Map<String, dynamic>>> getSecrets(String teamId) async {
final response = await _apiService.getSecrets(teamId);
if (response.isSuccessful) {
final data = response.body;
if (data == null) return [];
final list = data['secrets'] as List<dynamic>?;
if (list == null) return [];
return list.map((e) => Map<String, dynamic>.from(e as Map)).toList();
}
throw HttpException(
'Failed to get secrets from server: ${response.statusCode} ${response.error}',
);
}