updateVariable method
Update a variable by ID
Implementation
Future<Response> updateVariable(String id, {
required String key,
required String value,
String? projectId,
}) async {
try {
final response = await _dio.put(
'/variables/$id',
data: {
'key': key,
'value': value,
if (projectId != null) 'projectId': projectId,
},
);
return response;
} on DioException catch (e) {
throw Exception('Failed to update variable: ${e.message}');
}
}