-
What is the best way to define column requirements for tables used with certain functions? For example, I have this mixin: mixin SyncableTable on Table {
DateTimeColumn get updatedAt =>
dateTime()
.withDefault(currentDateAndTime)
.map(const LocalDateTimeConverter())();
} I also have functions that take such a table as an argument and interact with that column. I tried defining an interface: abstract class StoreTable extends Table implements SyncableTable {} This works on the Dart side, but generates a lot of warnings in the builder:
Is there another approach that could work, or should we look at fixing the builder warnings? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
@KrisBraun Implementing a Mixins should be added with
@simolus3 This is rare, but an issue should be filed |
Beta Was this translation helpful? Give feedback.
-
Huge 🙌 for this package and the amazing maintainership! ❤️ |
Beta Was this translation helpful? Give feedback.
Awesome (TIL!) -- using the mixin directly is clearly exactly what I want. Didn't occur to me that it would include the base
Table
type. Using the mixin directly and removing the abstract class works perfectly.