You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dart doesn't support overloading, but is there another way people can provide strings or binary values directly to api methods instead of first creating StringValue or BinaryValue?
Or possibly just make keys accept only strings for now and let values by StringValue or BinaryValue
Can ping Chris for more details/ideas on how to handle this
The text was updated successfully, but these errors were encountered:
Alternative for function overloading: optional parameters. Can't have parameters with the same name, though, even if they're different types, so it would still be a signature like get(String cacheName, {String? stringKey, List<int>? binaryKey})
Alternative for type unions: use the dynamic type. We can take an approach similar to the Swift SDK where the public-facing CacheClient accepts string and binary values directly but the internal data client accepts only StringValue or BinaryValue.
--> Turns out this is NOT an idiomatic Dart approach
Or we go the current route which is similar to the Go sdk where users have to construct StringValue or BinaryValue before passing items in.
Seems like the most idiomatic approach would be to create one method for each specific operation
Dart doesn't support overloading, but is there another way people can provide strings or binary values directly to api methods instead of first creating StringValue or BinaryValue?
Or possibly just make keys accept only strings for now and let values by StringValue or BinaryValue
Can ping Chris for more details/ideas on how to handle this
The text was updated successfully, but these errors were encountered: