findWorld method

T? findWorld()

Implementation

T? findWorld() {
  return ancestors(
    includeSelf: true,
  ).firstWhereOrNull((ancestor) => ancestor is T) as T?;
}