id property

int get id

The engine's id: never 0, and never reused. Throws a StateError before the object is added.

Implementation

int get id => _world == null ? throw _notAdded('it has no id') : _id;