```dart // Tests only against the local state Future savePredicateLocally(Post post) async { if (post.title.startsWith('[Amplify]')) { await Amplify.DataStore.save(post); } } // Only applies the update if the data in the remote backend satisfies the criteria Future savePredicateRemotely(Post post) async { try { await Amplify.DataStore.save( post, where: Post.TITLE.beginsWith('[Amplify]'), ); } catch (e) { ... } } ```