Open Lance-Kraakman opened 1 year ago
Hi @Lance-Kraakman thanks for opening this issue! Glad to see you've found a solution to the type error for dateTime.
Your solution looks good. I will mark this as a feature request for Amplify Flutter Datastore to officially support QueryPredicate for DateTime but the code you wrote should work for your case in the meantime.
Description
Doing a simple observeQuery, with a TepmoralDateTime string
Is throwing this error.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: QueryException { E/flutter (13707): "message": "Invalid type. The .contains() query predicate only supports type String and List.",
E/flutter (13707): "recoverySuggestion": "Ensure that the field is of the appropriate type."
E/flutter (13707): }
If I change evaluate (in query_field_operators.dart) to:
It works fine. Although there will likely be a more elegant solution. Any suggestions?
Thanks
Categories
Steps to Reproduce
Doing a simple observeQuery, with a TepmoralDateTime query string in the 'contains' query.
Platforms
Flutter Version
3.13
Amplify Flutter Version
1.3.2
Deployment Method
Amplify CLI
Schema
No response