BelongsTo<E extends DataModel<E> > constructor
BelongsTo<E extends DataModel<E> > ([
- E? model
Creates a BelongsTo relationship, with an optional initial E
model.
Example:
final author = Author(name: 'JK Rowling');
final book = Book(id: 1, author: BelongsTo(author));
Implementation
BelongsTo([final E? model]) : super(model != null ? {model} : null);