getId method Null safety

int getId()

Implementation

int getId() => _id;