idAs<I> method

I? idAs<I>()

Returns id as I or null. See idNotNullAs.

Implementation

I? idAs<I>() {
  var id = this.id;
  return id is I ? id : null;
}