shouldClose method

bool shouldClose(
  1. R rl
)

Returns true when the app loop should stop.

Branches on currentRaylibPlatform. WASM has no exit condition of its own (the browser owns the loop) and WindowShouldClose should not be called in WASM backend, so this one check is the honest boundary of "agnostic" rather than a leak in the abstraction.

Defaults to

Override to implement custom exit conditions.

Implementation

bool shouldClose(R rl) => switch (currentRaylibPlatform) {
  .native => rl.module<RaylibCoreDart>().WindowShouldClose(),
  .web => false,
};