updateResource method
Future<bool>
updateResource({
- required String key,
- required String projectId,
- required LocalizedTextModel base,
- ResourceType? type,
- List<
LocalizedTextModel> ? translations,
Implementation
Future<bool> updateResource({
required String key,
required String projectId,
required LocalizedTextModel base,
ResourceType? type,
List<LocalizedTextModel>? translations,
}) async {
final response = await _dio.patch('$_baseUrl/projects/$projectId/resources/$key', data: {
'key': key,
// 'type': type?.name,
'localisedTexts': [
base,
if (translations != null) ...translations,
],
});
return response.statusCode == 200;
}