pocketbase / dart-sdk

PocketBase Dart SDK
https://pub.dev/packages/pocketbase
MIT License
511 stars 51 forks source link

Object? instead of dynamic for AuthStore #52

Closed rodydavis closed 8 months ago

rodydavis commented 8 months ago

When working with Dart using Object? instead of dynamic leads to a better API since the Model can be null.

ganigeorgiev commented 8 months ago

I agree that it results in a better API (I don't remember at the moment exactly why I decided on dynamic) but let's not do this for now as it could introduce a small breaking change for those using custom stores and I'm not sure if it will be justified.

I've added it in my todo and will consider eventually updating it in the future (or maybe replace it with a sealed class to make use of the Dart 3 pattern matching support as other users suggested in the past).

rodydavis commented 8 months ago

Sounds good! Glad it is on the radar 👍🏼