When I try to create a data object to save in my database, it is giving me a warning saying that the id is required. However, the is should be automatically created by moor when added to the database, as it is marked as autoincrement. My table code is
class Countdowns extends Table {
IntColumn get id => integer().autoIncrement()();
TextColumn get name => text().withLength(min: 1, max: 100)();
DateTimeColumn get date => dateTime()();
}
Is this warning safe to ignore? If not, what should I do about it? My code to create the data object is
countdown = Countdown(date: initialDate);
I will fill in the name field when the user enters a name for the countdown.