Id constructor

const Id({
  1. bool assignable = false,
})

Marks the field of an Entity class as its ID property. The field must be of type int, be non-final and have not-private visibility (or a not-private getter and setter method).

ID properties are unique and indexed by default.

Implementation

const Id({this.assignable = false});