pocketbase / dart-sdk

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

make models `RecordModel|AdminModel|null` use a base type `BaseModel` to avoid use of `dynamic` #54

Closed Luckey-Elijah closed 7 months ago

Luckey-Elijah commented 7 months ago

There are 6 occurrences of the "union" RecordModel|AdminModel in the pockebase/dart-sdk:

Since dart does not have true unions I propose we implement some abstract parent type or with some mixin to provide "better than dynamic" types for locations in order to provide a better developer experience.

ganigeorgiev commented 7 months ago

With the planned refactoring this will be normalized and everything will be a Record.