updateTheme method
Updates an existing theme.
May throw InternalServerException.
May throw InvalidParameterException.
May throw ResourceConflictException.
Parameter appId :
The unique ID for the Amplify app.
Parameter environmentName :
The name of the backend environment that is part of the Amplify app.
Parameter id :
The unique ID for the theme.
Parameter updatedTheme :
The configuration of the updated theme.
Parameter clientToken :
The unique client token.
Implementation
Future<UpdateThemeResponse> updateTheme({
required String appId,
required String environmentName,
required String id,
required UpdateThemeData updatedTheme,
String? clientToken,
}) async {
final $query = <String, List<String>>{
if (clientToken != null) 'clientToken': [clientToken],
};
final response = await _protocol.sendRaw(
payload: updatedTheme,
method: 'PATCH',
requestUri:
'/app/${Uri.encodeComponent(appId)}/environment/${Uri.encodeComponent(environmentName)}/themes/${Uri.encodeComponent(id)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
final $json = await _s.jsonFromResponse(response);
return UpdateThemeResponse(
entity: Theme.fromJson($json),
);
}