Entity<Key extends EntityKey> constructor

Entity<Key extends EntityKey>({
  1. String? id,
  2. int? timeMills,
})

Constructs an Entity object with optional id and timeMills.

Implementation

Entity({
  String? id,
  int? timeMills,
})  : _id = id ?? generateID,
      _timeMills = timeMills ?? generateTimeMills;