gameRef property

BonfireGameInterface get gameRef

Implementation

BonfireGameInterface get gameRef {
  final gameR = _getGameRef();
  if (gameR == null) {
    throw StateError(
      'Cannot find reference $BonfireGameInterface in the component tree',
    );
  } else {
    return gameR;
  }
}
set gameRef (BonfireGameInterface gameRef)

Implementation

set gameRef(BonfireGameInterface gameRef) {
  _gameRef = gameRef;
  children.whereType<BonfireHasGameRef>().forEach((e) => e.gameRef = gameRef);
}