Page updated Jan 16, 2024

Delete data

Amplify Flutter v0 is now in Maintenance Mode until July 19th, 2024. This means that we will continue to include updates to ensure compatibility with backend services and security. No new features will be introduced in v0.

Please use the latest version (v1) of Amplify Flutter to get started.

If you are currently using v0, follow these instructions to upgrade to v1.

DELETE requests

1Future<void> deleteTodo() async {
2 try {
3 const options = RestOptions(path: '/todo/1');
4 final restOperation = Amplify.API.delete(restOptions: options);
5 final response = await restOperation.response;
6 print('DELETE call succeeded');
7 print(response.body);
8 } on ApiException catch (e) {
9 print('DELETE call failed: $e');
10 }
11}