save method
Saves the model to the database.
Implementation
Future<void> save() async {
if (id != null) {
await query.where('id', '=', id).update(toDatabaseJson());
} else {
await query.insert(toDatabaseJson());
}
}
Saves the model to the database.
Future<void> save() async {
if (id != null) {
await query.where('id', '=', id).update(toDatabaseJson());
} else {
await query.insert(toDatabaseJson());
}
}