```dart import 'package:amplify_flutter/amplify_flutter.dart'; import 'models/ModelProvider.dart'; Future savePredicate(Post post) async { final post = ...; // get post using the query API final updatedPost = post.copyWith(title: '[Amplified]'); try { // if the post title has changed to something else other than // a string that starts with "[Amplify]", the save will be rejected await Amplify.DataStore.save( updatedPost, where: Post.TITLE.beginsWith("[Amplify]"), ); } on DataStoreException { safePrint('Could not update post, maybe the title has been changed?'); } } ```